0
在我的項目中,或者如果您參考附加故事板,我有一個UITabBarController嵌入UINavigationController與rootview作爲UIViewController。看看我附加的GIF,注意當我點擊「從我的圖片中選擇」時,我的標籤欄消失,並在「取消」後消失。TabBar在啓動後消失UIImagePickerController
我的代碼如下:
在我的 「選擇從我的圖片」 按鈕
@IBAction func chooseLibrary(sender: AnyObject) {
let picker = UIImagePickerController()
picker.delegate = self
picker.sourceType = .PhotoLibrary
picker.allowsEditing = true
self.navigationController?.presentViewController(picker, animated: true, completion: nil)
}
在我的 「取消」 按鈕
func imagePickerControllerDidCancel(picker: UIImagePickerController) {
self.navigationController?.dismissViewControllerAnimated(true, completion: nil)
}
我也附上了我的故事板以防萬一。
是的,我拖出一個UITabBarController,並嵌入一個UINavigationController。最後,將UIViewController作爲根視圖。你能否詳細說明如何隱藏壓力可以提供幫助? – jo3birdtalk