我有以下問題:我有一個ViewController與UIScrollView和UICollectionView在其中。當我在此View Controller中直接啓動應用程序時,一切正常。當我打電話的ViewController,從另一個視圖控制器(這裏是一個谷歌地圖SDK地圖),在視圖控制器的負載,但是當我嘗試滾動我得到這個消息,並且應用程序停止:執行Segue後事情不起作用
*** -[TheSecondViewController respondsToSelector:]: message sent to deallocated instance 0x16ef3890
下面是一些更多的代碼: 調用視圖:
-(void)mapView:(GMSMapView *)mapView didTapInfoWindowOfMarker:(GMSMarker *)marker {
[self performSegueWithIdentifier:@"OpenSecondView" sender:self];
}
viewDidLoad中的secondView:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
if (IS_IPHONE5) {
self.scrollV.frame = CGRectMake(0, 0, 320, 568);
NSLog(@"Das Geraet ist ein iPhone 5/iPhone 5S");
} else {
self.scrollV.frame = CGRectMake(0, 0, 320, 480);
NSLog(@"Das Geraet ist ein iPhone 4/iPhone 4S");
}
[self.view bringSubviewToFront:scrollV];
[scrollV setScrollEnabled:YES];
[scrollV setDelegate:self];
[scrollV setContentSize:CGSizeMake(320, 833)];
[collectionV setScrollEnabled:NO];
activityInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;
[activityInd startAnimating];
[imageView setUserInteractionEnabled:YES];
}
請提供一些更多詳細信息和源代碼 – 2014-09-02 11:31:06
提供SecondViewController的viewDidLoad的一些源代碼 – 2014-09-02 12:04:04
看起來你的一些屬性缺少強有力的參考。請張貼更多信息。 – anoop4real 2014-09-02 12:05:11