隐藏= NO后,TabBar不起作用

时间:2014-11-12 01:21:32

标签: ios objective-c iphone uiimagepickercontroller uitabbar

我遇到了一个问题:在命令self.tabBarController.tabBar.hidden = YES之后,我做了一些事情然后调用:self.tabBarController.tabBar.hidden = NO,标签根本不起作用。它看起来像冻结

- (void)showImagePickerForSourceType:(UIImagePickerControllerSourceType)sourceType
{
    UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
    imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
    imagePickerController.sourceType = sourceType;
    imagePickerController.delegate = self;

    if (sourceType == UIImagePickerControllerSourceTypeCamera)
    {

        self.tabBarController.tabBar.hidden = TRUE;

        imagePickerController.showsCameraControls = YES;


    }
    self.imagePickerController = imagePickerController;
    [self presentViewController:self.imagePickerController animated:YES completion:nil];

}

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
    [self dismissViewControllerAnimated:YES completion:NULL];
    self.tabBarController.tabBar.hidden = FALSE;

}

按下取消标签栏后出现,但标签根本不起作用

0 个答案:

没有答案