好的,真正的快速问题,如果我想在一个方法中传递一个视图控制器,这将是正确的方法(显然,两者似乎都有效) -
-(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");
} }