0
我正在做一個模塊,其中有一個引腳刪除功能。 針[圖像視圖]被放置在可縮放的滾動視圖上。 當縮放圖像視圖時,會根據其中心位置移動。問題與圖像查看orgin在ios
我想讓它與底點一起移動。
- (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));
}
}
你不希望把事情的像素邊界上,所以在最後一幀使用CGRectIntegral以避免模糊的圖像。 –