1
我有一個帶有核心圖圖視圖的子視圖的滾動視圖。它不經常變焦。如果我們在滾動視圖後縮放滾動視圖,它將會變焦。帶有coreplot圖的子視圖的UIScrollView不經常縮放
每次委託方法 - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
將被調用,但調用委託方法的機會 - (void)scrollViewDidZoom:(UIScrollView *)scrollView
非常少。
這種行爲的原因是什麼?
[consumptionGraphView_ addSubview:graphPlottedView_];
[graphPlottedView_ setContentScaleFactor:consumptionGraphView_.contentScaleFactor];
consumptionGraphView_.contentSize = consumptionGraphView_.frame.size;
consumptionGraphView_.minimumZoomScale = 1.0;
consumptionGraphView_.maximumZoomScale = 10.0;
consumptionGraphView_.zoomScale = 0.1;
在託管視圖中設置'allowPinchScaling' = NO以自動完成此操作。 – 2012-02-08 03:28:26