Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 视图控制器未显示_Ios_Xcode_Ipad_Object_Uiviewcontroller - Fatal编程技术网

Ios 视图控制器未显示

Ios 视图控制器未显示,ios,xcode,ipad,object,uiviewcontroller,Ios,Xcode,Ipad,Object,Uiviewcontroller,我正在开发一个包含多个模态视图控制器的棒球游戏应用程序。但是,当我从“BasicGameSetupViewController”到“BasicViewController”进行模式转换时,会发生转换(因为我在BasicViewController中的ViewDidLoad方法中有NSLog语句),但实际视图不会更新。下面是我转换到BasicViewController的方法(此代码位于BasicGameSetupViewController中): (此块还有一个“prepareForSegue”

我正在开发一个包含多个模态视图控制器的棒球游戏应用程序。但是,当我从“BasicGameSetupViewController”到“BasicViewController”进行模式转换时,会发生转换(因为我在BasicViewController中的ViewDidLoad方法中有NSLog语句),但实际视图不会更新。下面是我转换到BasicViewController的方法(此代码位于BasicGameSetupViewController中):

(此块还有一个“prepareForSegue”方法) 下面是BasicViewController中的viewDidLoad方法:

- (IBAction)pressedBeginPlay:(id)sender {
    numOfInnings = [selectInnings selectedSegmentIndex];
    numOfInnings = numOfInnings + 1;
    row = [teamSelector selectedRowInComponent:0];
    visitor = [teams objectAtIndex:row];
    row = [teamSelector selectedRowInComponent:1];
    home = [teams objectAtIndex:row];
    NSLog(@"%@", visitor);
    NSLog(@"%@", home);
    if([awaySelect selectedSegmentIndex] == 0)
    {
        awayPlayer = @"Human";
    }
    else
    {
        awayPlayer = @"CPU";
    }
    if([homeSelect selectedSegmentIndex] == 0)
    {
        homePlayer = @"Human";
    }
    else
    {
        homePlayer = @"CPU";
    }
    [self performSegueWithIdentifier:@"startBeginnerToBasic" sender:self];
}
- (void)viewDidLoad{
    NSLog(@"Made it to basic View controller");
    homeLineup = [[NSMutableArray alloc] initWithCapacity:9];
    visitorLineup = [[NSMutableArray alloc] initWithCapacity:9];
    batter = [[NSMutableArray alloc] initWithCapacity:22];
    homePitcher = [[NSMutableArray alloc] initWithCapacity:22];
    awayPitcher = [[NSMutableArray alloc] initWithCapacity:22];
    pitcher = [[NSMutableArray alloc] initWithCapacity:22];
    homeAlreadyPitched = [[NSMutableArray alloc]initWithCapacity:5];
    awayAlreadyPitched = [[NSMutableArray alloc] initWithCapacity:5];
    NSLog(@"arrays initialized");
    [super viewDidLoad];
    [self setUpTeams];
    [self checkForComputer];
    [self newBatter];
    [self atBat];
    // Do any additional setup after loading the view.
}
我完全搞不懂为什么我的观点没有显示出来。上面ViewDidLoad代码块中的NSLog语句将显示,但我无法让视图显示。有人有什么想法吗?
提前感谢您的帮助

您期望看到什么以及您实际看到的是什么?这不是您想要的答案,但这里有一些建议和建议:您通常应该尽早致电[super viewDidLoad]。否则,超类可能会干扰您自己的实现@MoisesCardenas,我确实在[viewDidLoad]方法的顶部有[super viewDidLoad],但它仍然在做同样的事情…@LuisCien,我希望看到BasicViewController的视图(我在情节提要中创建的),但我看到的是我在情节提要中设计的BasicGameSetupViewController。我原本以为它被锁定了,但我把NSLog语句放在了显示的BasicViewController中,所以它肯定会进入BasicViewController