OK,真正快速的問題,如果我想傳遞一個方法的視圖控制器,這是正確的方式(顯然,似乎都工作) -的UIViewController傳遞方法
-(void)fetchedDataN:(UIViewController *)response
或
-(void)fetchedDataN:(ViewController *)response
編輯:這裏是爲了澄清事情
- (IBAction)nextButton:(id)sender {
activityN.hidden=NO;
[activityN startAnimating];
[self.view bringSubviewToFront:activityN];
[audioFile stop];
NSLog(@"HELL O");
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
Page04ViewController *viewControl=[[Page04ViewController alloc]initWithNibName:nil bundle:nil];
[self performSelectorOnMainThread:@selector(fetchedDataN:)
withObject:viewControl waitUntilDone:YES];
}); }
-(void)fetchedDataN:(UIViewController *)response{
if ([self interfaceOrientation] == UIDeviceOrientationLandscapeLeft) {
[self presentViewController:response withPushDirection:@"fromTop"];
// NSLog(@"landscape left");
}
else if([self interfaceOrientation] == UIDeviceOrientationLandscapeRight)
{
[self presentViewController:response withPushDirection:@"fromBottom"];
// NSLog(@"landscape right");
} }
'correct'的概念總是基於上下文 - 在什麼情況下是「正確」? – Wain