0
我有兩個UIViewController的。在廠景,我管理與PIN碼註解,所以我需要精確地推動視圖2時,在附件控制用戶點擊,我的代碼是這樣的:該segue沒有執行推動動作
-(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
NSLog(@"calloutAccessoryControlTapped");
[self performSegueWithIdentifer:@"My identifier" sender:self];
}
編譯時,我得到了這樣的警告:
Instance method '-performSegueWithIdentifer:sender:' not found (return type defaults to 'id')
和運行時,該應用明顯與此堆棧崩潰:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[view1 performSegueWithIdentifer:sender:]: unrecognized selector sent to instance 0x7d94ca0'
在情節串連圖板,我所選擇的視圖1,ctrl+left click+ drop
到視圖2,然後我選擇push
。另外,我已將segue標識符設置爲My identifier
。那麼我在這裏錯過了什麼?
oops,thanx man :)) – Malloc 2012-01-27 22:28:54