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
Objective c UISplitView的奇怪bug-视口可缩放到iPhone大小?_Objective C_Ios_Ipad_Uisplitviewcontroller - Fatal编程技术网

Objective c UISplitView的奇怪bug-视口可缩放到iPhone大小?

Objective c UISplitView的奇怪bug-视口可缩放到iPhone大小?,objective-c,ios,ipad,uisplitviewcontroller,Objective C,Ios,Ipad,Uisplitviewcontroller,我第一次使用Objective-C,在一个给我的应用程序中有一个奇怪的bug。以下图片显示了我遇到的问题: 当用户旋转iPad时,此屏幕显示。这是正常的。顶部的控件(在没有看到您的代码之前,我不能肯定,但在我看来,它与导航栏的自动旋转代码片段有关。发布视图确实加载了与导航栏位置相关的部分,以便我可以提供一些帮助。此外,在IB中,导航被添加为一个出口,并且没有正确地自动调整大小谢谢!如果您有机会查看,我添加了一些viewdidload的代码片段。代码似乎很好。它处理手势和其他东西。检查IB是否自

我第一次使用Objective-C,在一个给我的应用程序中有一个奇怪的bug。以下图片显示了我遇到的问题:


当用户旋转iPad时,此屏幕显示。这是正常的。顶部的控件(在没有看到您的代码之前,我不能肯定,但在我看来,它与导航栏的自动旋转代码片段有关。发布视图确实加载了与导航栏位置相关的部分,以便我可以提供一些帮助。此外,在IB中,导航被添加为一个出口,并且没有正确地自动调整大小谢谢!如果您有机会查看,我添加了一些viewdidload的代码片段。代码似乎很好。它处理手势和其他东西。检查IB是否自动调整大小。这可能就是问题所在。嗯。我在整个应用程序中浏览了各种XIB文件,并尝试了自动调整大小。但是,我还有同样的问题。还有其他想法吗?非常感谢你的帮助,顺便说一句。在这一点上,我没有任何更多的想法,除非我真的看了你的项目,这迫使我向你提供我的电子邮件,这是不允许在这个论坛。希望你能得到一些帮助,否则在我的电子邮件这里。Adrianp31@me.com
- (void)viewDidLoad {

    [super viewDidLoad];

    [self addGestureRecognizers];


    // initialize the "<" button...

    toggleButton = [[UIBarButtonItem alloc] initWithTitle:[PanoUtils leftIndicator] style:UIBarButtonItemStylePlain target:self action:@selector(toggleScreen)];
    // the annotate button...

    annotateButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Pencil.png"] style:UIBarButtonItemStylePlain target:self action:@selector(annotateTapped)];
    // the done button for annotations...

    doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneAnnotateTapped)];
    // a flexible spacer...

    nameFieldSpacerButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
    // the accelerometer button...

    alignButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"gyro.png"] style:UIBarButtonItemStylePlain target:self action:@selector(align:)];
    // and the search button.

    searchButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Search.png"] style:UIBarButtonItemStylePlain target:self action:@selector(searchButtonTouched:)];


    // customize the align button after the user selects it.

    UIImage *buttonImage = [UIImage imageNamed:@"gyroSelected.png"];

    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

    [button setImage:buttonImage forState:UIControlStateNormal];

    button.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);

    [button addTarget:self action:@selector(align:) forControlEvents:UIControlEventTouchUpInside];

    alignSelButton = [[UIBarButtonItem alloc] initWithCustomView:button];



    NSMutableArray *itemsArray = [toolBar.items mutableCopy];

    [itemsArray addObject:searchButton];

    [itemsArray addObject:annotateButton];

    [itemsArray addObject:alignButton];

    [toolBar setItems:itemsArray animated:NO];

    [itemsArray release];



    [self adjustToggleButton];



}