我正在做一个具有引脚丢弃功能的模块。 引脚[图像视图]被放置在可缩放的滚动视图上。 缩放时,图像视图根据其中心位置移动。
我想以它的最低点来推动它。
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale;
{
zoomLevel=scale;
for (SSSmartPinView *smartPinView in smartPinViewMutArray) {
smartPinView.zoomScale = zoomLevel;
smartPinView.parrentOffset = drawingScrollView.contentOffset;
smartPinView.center = CGPointMake(([smartPinView.coresmartPin.xpoint floatValue]*zoomLevel),(([smartPinView.coresmartPin.ypoint floatValue]+(zoomLevel))*zoomLevel));
}
}
- (void)scrollViewDidZoom:(UIScrollView *)scrollView{
zoomLevel=scrollView.zoomScale;
for (SSSmartPinView *smartPinView in smartPinViewMutArray){
smartPinView.zoomScale = zoomLevel;
smartPinView.parrentOffset = drawingScrollView.contentOffset;
smartPinView.center = CGPointMake(([smartPinView.coresmartPin.xpoint floatValue]*zoomLevel),(([smartPinView.coresmartPin.ypoint floatValue]+(zoomLevel))*zoomLevel));
}
}
答案 0 :(得分:1)