如何防止导航栏崩溃是xcode7

时间:2015-12-23 07:55:35

标签: ios9 xcode7

enter image description here

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath:NSIndexPath) {

    let storyboard = UIStoryboard(name: "Customer", bundle: nil)
    var destinationVC : AnyObject!


    case 0:            //CASE FOR default i.e. First VIEWCONTROLLER
        destinationVC = storyboard.instantiateViewControllerWithIdentifier("CustomerNewQuote") as! CustomerNewQuote
        self.presentViewController(destinationVC as! UIViewController, animated: true, completion: nil)
        // showViewController(destinationVC as! UIViewController, sender: destinationVC)
        print("First tapped")

        break;

同时presentViewController和showViewController隐藏了被叫视图controller.how的导航栏以防止这种情况发生。我在模拟器中添加了模拟指标和视图的屏幕截图。然后从其他视图调用下面的视图或者通过crtl + drag方法,导航栏消失了。我是iOS PLZ帮助的新手。提前谢谢。enter image description here

1 个答案:

答案 0 :(得分:0)

您只需要在特定的视图控制器中嵌入导航控制器。enter image description here

选择您的视图控制器