
我在这里定制了我的后门按钮.
UIbutton *btnBack = [UIbutton buttonWithType:UIbuttonTypeCustom];btnBack.frame = CGRectMake(0,45,35);[btnBack setTitle:@"Back" forState:UIControlStatenormal];[btnBack.TitleLabel setFont: [UIFont FontWithname:@"CourIEr" size:15]];btnBack.layer.cornerRadius=5.0;btnBack.layer.borderWIDth=2.0;[btnBack setBackgroundcolor:[UIcolor colorFbBlue]];btnBack.layer.bordercolor=[UIcolor colorFbBlue].CGcolor;[btnBack setTitlecolor:[UIcolor whitecolor] forState:UIControlStatenormal];[btnBack addTarget:self action:@selector(Click_On_Btn_Back) forControlEvents:UIControlEventtouchUpInsIDe];UIbarbuttonItem *backbarbutton = [[UIbarbuttonItem alloc] initWithCustomVIEw:btnBack];-(voID)Click_On_Btn_Back{[self dismissVIEwControllerAnimated:YES completion:nil]; } 这就是我从前一个视图控制器推送segue的方式.
if([segue.IDentifIEr isEqualToString:@"segueFbShare"]){ FbShareVIEwController *fbVC=[segue destinationVIEwController]; fbVC.imageUrl=self.product.ImageUrl;}解决方法 使用UINavigationController时转到上一个UIVIEwController: [self.navigationController popVIEwControllerAnimated:YES];
将这行代码放在Click_On_Btn_Back方法中
总结以上是内存溢出为你收集整理的ios – dismissViewControllerAnimated无效全部内容,希望文章能够帮你解决ios – dismissViewControllerAnimated无效所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)