![](/img/trans.png)
[英]Segue from one ViewController to another ViewController inside a Tab Bar Controller?
[英]Tab bar vanishes from a viewController when returned to via a segue - swift
我有一個使用標簽欄的應用程序。 我有一個自定義的相機視圖分配給一個標簽。 捕獲圖像后,可以在另一個視圖控制器中預覽它。 當我點擊自定義后退按鈕時(通過使用segue),我返回到自定義相機視圖。 但是,我看不到標簽欄嗎? 請能有人建議嗎?
圖像捕捉:
// Preview cropped image in another vC
if let unwrpCroppedImg = croppedImg{
self.croppedImage = unwrpCroppedImg
self.performSegue(withIdentifier: "segPreview", sender: nil)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "segPreview"{
let previewVC = segue.destination as! PreviewImageViewController
previewVC.prevImage = self.croppedImage
}
}
返回鍵
@IBAction func cancelCapture(_ sender: Any) {
// Go back to image capture
performSegue(withIdentifier: "segCancelImage", sender: nil)
}
試試這個可能對您有幫助
將Segue imageViewController移除到相機屏幕。
@IBAction func cancelCapture(_ sender: Any) { self.dismiss(animated: true, completion: nil) //self.navigationController?.popViewController(animated: true) //If push type navigation. }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.