打开应用程序时,底部工具栏丢失了?

时间:2013-06-02 07:01:47

标签: ios objective-c uiview uiviewcontroller uitoolbar

当我加载应用程序时,我的底部工具栏丢失,但是当我将工具栏移动到屏幕的中心时,它显示。我的视图框架默认为0,0,320,480。那么为什么底部工具栏不显示? 检查图像,你可以看到顶部栏但是底栏缺失,它没有隐藏在代码或属性中,当我将它移动到顶部或中心强大的文本**屏幕时我们可以看到**

enter image description here

- (void)viewDidLoad {
  UIAlertView* _alertView = [[UIAlertView alloc] initWithTitle:@"Loading Chapters..."
                                                             message:@"\n"
                                                            delegate:self
                                                   cancelButtonTitle:nil
                                                   otherButtonTitles:nil];

        UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        // UIProgressView *loading=[[UIProgressView alloc]initWithProgressViewStyle:UIProgressViewStyleBar];

        // loading.center=CGPointMake(50,100);
        spinner.center = CGPointMake(139.5, 75.5); // .5 so it doesn't blur

        [_alertView addSubview:spinner];
        // [_alertView addSubview:loading];

        [spinner startAnimating];
        [_alertView show];
          if(loadingProgressBar+1>[sharedManager.spineArray count]) {

            [_alertView dismissWithClickedButtonIndex:0 animated:YES];
        }


    [_alertView dismissWithClickedButtonIndex:0 animated:YES];
      [super viewDidLoad];

    if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation))

    {
        webView.frame=CGRectMake(0,0,480,315);

          BottomBar.frame=CGRectMake(0,260, CGRectGetWidth(self.view.bounds),41);

        //NSLog(@"%f%f",CGRectGetHeight(self.view.bounds), CGRectGetWidth(self.view.bounds));

    }
    }

1 个答案:

答案 0 :(得分:2)

确保您的工具栏视图属性是这样的

enter image description here