jjzjj

popViewController

全部标签

iOS:UIVIew 在 segue 和 popViewController 之后回到起始位置

我有UIViewController,这些UIViewController中有一些动画。在此UIViewController上设置动画的UIView具有不同的开始和结束位置。我也有segue,它将把新的UIViewController推到现场。一切正常,但如果我返回到我的第一个UIViewController,我的UIVIew的位置将更改为开始位置。我该如何解决这个问题?-(void)viewDidLoad{[superviewDidLoad];[UIViewanimateWithDuration:0.3animations:^{self.myView.center=CGPointMa

ios - PopViewController 动画 :YES when tap on UIAlertView make Keyboard appear in parentVC

我试图以编程方式popViewcontroller通过这样做-(void)alertView:(UIAlertView*)alertViewclickedButtonAtIndex:(NSInteger)buttonIndex{[[selfnavigationController]popViewControllerAnimated:YES];}问题是我在这个VC中有textFields。如果textField处于事件状态并且键盘正在显示,并且如果我显示AlertView并使用命令退出键盘([[selfview]endEditing:YES]或[textFieldresignFirstR

ios - 防止 UINavigationBar popViewController 动画

我有以下问题:我已经覆盖了UINavigationController的popViewControllerAnimated:(BOOL)animated因为我想要自定义动画。代码如下:-(UIViewController*)popViewControllerAnimated:(BOOL)animated{UIViewController*poppedCtrl=[superpopViewControllerAnimated:NO];[((customViewController*)self.topViewController)doCustomAnimation];returnpopped

iphone - 如何在延迟后为 popViewController 设置动画?

我有一个带有选项列表的UITableViewController。用户点击一个后,我想返回到上一个View。不过,对于我正在使用的代码,返回似乎太快了。我想暂停0.2秒左右,让用户有时间看到他们的选择被选中。这是我现在使用的代码:-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath{NSUIntegeroldSelection=[[selectedCriteriaobjectAtIndex:criteriaSection]integerValue];[tableVi

ios - 使用 popViewController 动画时按钮色调会改变颜色

在View#1中,我在Storyboard中设置了两个控件;一个是导航栏中的UIBarButtonItem,另一个是UISegmentedController。前者是自定义绘制的图像,两个项目的色调都设置为紫色(在Storyboard属性检查器中设置的色调)。通过各种操作,用户可以通过View#1访问View#2。如果在View#2中不满足特定条件,用户将显示一条错误消息,并被重定向回View#1点击“确定”。相关代码:if(i==[self.itemsAvailablecount]){UIAlertView*alertView=[[UIAlertViewalloc]initWithT

objective-c - 当我执行 popViewController 动画时无法显示导航栏

我有两个viewControllers,我正在从FirstView导航到SecondView,通过将SecondView推送到导航Controller。因为我不想要导航栏要显示在SecondView中,我执行以下操作self.navigationController.navigationBar.hidden=YES;然后我从secondView回到FirstView如下[self.navigationControllerpopViewControllerAnimated:YES];但现在导航栏也没有显示在FirstView中,因为我将它隐藏在第二View。我正在尝试在FirstView

iphone - 导航栏在 popviewcontroller 上消失

在我的一个View中,当按下按钮时,我调用另一个View,即SplitViewController。如果此SplitViewController是通过这些按钮之一调用的,我会将特殊对象添加到View中。大多数只是导航栏项目,比如取消按钮。可以在别处访问此View,并且不需要这些项目,这就是存在特殊条件的原因。但是,当用户完成操作并且我将ViewController弹回到之前选择的屏幕时,导航栏会在该屏幕上消失。我没有将其设置为隐藏,也没有对导航栏做任何奇怪的事情。只需添加SplitViewController然后弹出即可。一些代码..//declarethesplitscreenVCS

ios - popViewController 操作后的上边距 UITableViewController

我有带UITableView的简单ViewController。在第一次(viewDidLoad)表加载良好(无上边距)。在didSelectRowAtIndexPath中,我将新的ViewController推送到navigationController堆栈中,并且在返回操作之后,我在UITableView中获得了上边距。它只发生在第一次!如果我使用overridefuncviewDidAppear(animated:Bool){mainTable.contentInset=UIEdgeInsetsZero;}它已修复,但我看到动画效果不佳!在viewWillAppear中它根本不起

ios - 为什么在 presentviewcontroller 处于警报状态后 popviewcontroller 不工作?

//Eventcreatedalertletalert=UIAlertController(title:"EventCreated",message:"Eventsuccessfullycreated",preferredStyle:UIAlertControllerStyle.Alert);alert.addAction(UIAlertAction(title:"OK",style:UIAlertActionStyle.Default,handler:nil));self.presentViewController(alert,animated:true,completion:nil

ios - popToViewController 不工作,但 popViewController 可以

Terminatingappduetouncaughtexception'NSInternalInconsistencyException',reason:'Triedtopoptoaviewcontrollerthatdoesn'texist.'使用这段代码时self?.navigationController?.popToViewController(vc2,animated:true)但是当我尝试简单地弹出它的工作原理时self?.navigationController?.popViewController(animated:true)我正在插入这个viewController