4
點擊UIView後,我隱藏它並用UIView和Quartz drawRect初始化新對象。爲什麼UIImageView僅在延遲後才隱藏?
- (void)viewTapped:(UITapGestureRecognizer *)recognizer {
self.vignetteView.hidden=true;
lupeItself = [[LoupeView alloc] initWithView:_pageView setZoomImageName:_zoomPageImageName setDelegate:self];
}
上面的代碼僅在延遲了2秒後隱藏了UImageView。但是如果最後一行(LoupeView alloc等)被刪除,它會立即被隱藏。爲什麼?如何立即隱藏視圖?