我有1个观点,分两个。 其中一人比另一方高出10倍。 我有一幅大奖(上台)。
我想能够把大片从护.者之间的一个 anchor点上穿pin。 我只想把这种转变从同一个全球立场的基点进行,但却不改变自己的固定点。
我希望我解释自己。 该守则是:
- (void)twoFingerPinch:(UIPinchGestureRecognizer *)gestureRecognizer
{
//this changes the anchor point of "big" without moving it
[self adjustAnchorPointForGestureRecognizer:gestureRecognizer];
if ([gestureRecognizer state] == UIGestureRecognizerStateBegan || [gestureRecognizer state] == UIGestureRecognizerStateChanged) {
CGAffineTransform transform = CGAffineTransformScale([[gestureRecognizer view] transform], [gestureRecognizer scale], [gestureRecognizer scale]);
float scale = sqrt(transform.a*transform.a+transform.c*transform.c);
//this transforms "big"
[gestureRecognizer view].transform = transform;
//anchor point location in little view
CGPoint pivote = [gestureRecognizer locationInView:little];
CGAffineTransform transform_t = CGAffineTransformConcat(CGAffineTransformMakeTranslation(-pivote.x, -pivote.y), transform);
transform_t = CGAffineTransformConcat(transform_t, CGAffineTransformMakeTranslation(pivote.x, pivote.y));
little.transform = transform_t;
}
[gestureRecognizer setScale:1];
}
但是,这并不奏效,几乎看不出一气,一味.。
EDIT:更多信息。
Ok, this is the diagram:
红色广场是大观点,黑暗是一点。 主要看法是混淆了。
The line: [self adjustAnchorPointForGestureRecognizer:gestureRecognizer]; changes the big views anchor point to the center of the pinch gesture. That works.
随着我大观点的推移,小观点应相应地扩大规模,从而按现在的大致观点集中处理。 这就是说,它应该以与大观点相同的立足点加以扩大。
我希望,如果可能的话,这些转变不会在《气候变化公约》中看到什么观点。