2016-04-26 11 views
0

私はアプリケーションでグラフを表示するためにピンチズーム機能を使用しています。ピンチズームを行う場合、ジェスチャは、軸を異なるようにスケールする1つのXピンチコンポーネントと1つのYピンチコンポーネントを生成する必要があります。コアプロットでX軸とY軸を個別に(非均一に)ズームする

If the user's two fingers are on a straight vertical line, the graph should only be scaled on the Y axis. 

If the user's two fingers are on a straight horizontal line, the graph should only be scaled on the X axis. 

If the user's two fingers are on a straight line between 01.30 and 07.30 on a Clock (45 degrees), the graph should be scaled equally on the X and Y axis - I hope you get the idea. 

これはどのように達成できますか?コアプロットは関係なく、常にユーザの指が配置されているかの、XとYの上に均等に私のプロットをスケーリングします。\オフ

答えて

1

電源を入れ取り扱いピンチ(ホスティングビュー上allowPinchScaling = NO)を内蔵し、するために、独自のジェスチャー認識装置を提供インタラクション情報を取得し、スケーリング角度を計算します。

関連する問題