class TestVIEwController: UIVIEwController,UIImagePickerControllerDelegate,UINavigationControllerDelegate { @IBOutlet weak var button: UIbutton! overrIDe func vIEwDIDLoad() { super.vIEwDIDLoad() } overrIDe func dIDReceiveMemoryWarning() { super.dIDReceiveMemoryWarning() // dispose of any resources that can be recreated. } @IBAction func buttonpressed(sender: AnyObject) { let pickerC = UIImagePickerController() pickerC.delegate = self pickerC.modalPresentationStyle = .Popover pickerC.popoverPresentationController?.sourceVIEw = button as UIVIEw pickerC.popoverPresentationController?.sourceRect = (button as UIVIEw).bounds pickerC.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.Any self.presentVIEwController(pickerC,animated: true,completion: nil)//4 } func imagePickerController(picker: UIImagePickerController,dIDFinishPickingImage image: UIImage!,editingInfo: [NSObject : AnyObject]!) { self.dismissVIEwControllerAnimated(true,completion: nil) } func imagePickerControllerDIDCancel(picker: UIImagePickerController) { self.dismissVIEwControllerAnimated(true,completion: nil) }}
如果我单击取消或选择和图像,选择器控制器将正确解除.当我点击后退按钮返回tableVIEw时出现问题,我收到:
Unbalanced calls to begin/end appearance Transitions for <TestVIEwController: 0x7fb882a72380>.
TestVIEwController非常基础,为什么会这样呢?
解决方法 如果您尝试在上一个事务(动画)正在进行时推送新的视图控制器,则会出现此问题.因此,请检查您的代码流并进行适当的更改.检查你的解雇并呈现视图动画.您可以使用属性setAnimation’YES / NO’解决此问题设置动画:不,可能会解决您的问题
总结以上是内存溢出为你收集整理的ios – Swift Unbalanced调用开始/结束外观转换全部内容,希望文章能够帮你解决ios – Swift Unbalanced调用开始/结束外观转换所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)