草庐IT

pushViewcontroller

全部标签

iphone - self.navigationController pushViewController 没有将 Controller 添加到堆栈

我在一个名为vcA的viewController上,我这样做:[self.navigationControllerpushViewController:vcBanimated:YES];并且有效。vcB被插入。在vcB的viewDidAppear中,我这样做:NSArray*controllers=self.navigationController.viewControllers;Controller只包含一个对象,vcA!!!!(什么?)为什么要将vcB添加到Controller数组中?有什么可以阻止这种情况发生的吗?谢谢。 最佳答案

objective-c - pushViewController 占用过多显示 View

我有一个非常轻的ViewController,它在viewDidLoad中什么都不做。我将这个View推到navigationController之上。从block内部调用执行此操作的方法。在调用showView之后,我添加了一个NSLog,该日志在控制台中的打印速度非常快,但是加载View需要很多时间……我真的不明白可能发生了什么……有什么想法吗???ABAddressBookRequestAccessWithCompletion(addressBookRef,^(boolgranted,CFErrorReferror){[selfshowView];NSLog(@"EXECUTED

iphone - 在 pushViewController 之前设置 View Controller 属性

在我的应用程序中,我向View添加了标签,将其连接到导出,但是当我首先从另一个ViewController分配该导出然后调用pushViewController来显示它时,没有任何显示。这是推送下一个显示标签的View之前的代码:CustomViewController*vc=[[CustomViewControlleralloc]init];vc.lbl_price.text=self.label_price.text;//lbl_priceisdefinedasapropertyinCustomViewControllerandlabel_priceisdefinedincurre

ios - [self.navigationController pushViewController :ngView animated:YES]; not working

如果我用NGViewController*ngView=[[NGViewControlleralloc]initWithNibName:Nilbundle:Nil];[selfpresentViewController:ngViewanimated:NOcompletion:nil];上面的代码Controller将转到NGViewController页面。但是如果我使用这个导航ControllerNGViewController*ngView=[[NGViewControlleralloc]initWithNibName:Nilbundle:Nil];[self.navigation

ios - 在 presentViewController 不起作用后调用 pushViewController

我正在这样展示我的ViewController-[self.navigationControllerpresentViewController:self.thingContainerViewControlleranimated:YEScompletion:nil];//self.navigationControllernotnilhere这显示了一个UITableView。我想从这里在导航堆栈上推送一个VC。但是此时self.navigationController为nil。知道如何进行这项工作吗?[self.navigationControllerpushViewController

ios - pushViewController 带有缩放动画,显示背景

我找到了通过缩放动画调用pushViewController的方法,像facebookiPhone应用程序主菜单图标点击动画。(新的viewController从中心弹出,并缩放到原始大小。)我搜索了几种改变pushViewController动画的方法。首先,我试过这个:viewController.view.transform=CGAffineTransformMakeScale(0.5f,0.5f);[UIViewanimateWithDuration:0.5fanimations:^{viewController.view.transform=CGAffineTransform

ios - UINavigationBar 立即消失,而带动画的 pushViewcontroller 为真

我正在尝试使导航栏在显示时对一个ViewController透明。有用。但是,当我从父ViewController再次重新进入ViewController时,动画似乎不正确。第一次导航栏以动画方式停留和消失,直到第二个View完全显示。然而,第二次及以后,导航栏完全消失,第二个View以动画形式显示。我在这里创建了一个最小项目来显示问题:https://github.com/zwang/CVNavigationBarTest问题重现步骤:单击颜色ViewController中的代码块之一点击后退按钮再次单击其中一个代码块。看到问题第一次单击颜色ViewController中的一个颜色b

ios - PushViewController 两次当我双击太快时

当我调用将ViewController推送到详细聊天Controller(一对一聊天)时,我有以下代码。但是,如果我点击得太快,ViewController将被推送两次。动画看了两遍。谁能指出我的错误在哪里?代码来自LBTA的Youtube类(class)(FirebaseChat)。overridefunctableView(_tableView:UITableView,didSelectRowAtindexPath:IndexPath){letmessage=messages[indexPath.row]guardletchatPartnerId=message.chatPartn

ios - 使用 pushViewController 传递数据?

使用这段代码,我能够“继续”到我的ViewController的同一个实例funccollectionView(_collectionView:UICollectionView,didSelectItemAtindexPath:IndexPath){letstoryboard=UIStoryboard(name:"Main",bundle:nil)letvc=storyboard.instantiateViewController(withIdentifier:"DetailVC")self.navigationController?.pushViewController(vc,ani

ios - 卡住!只能给presentviewcontroller传数据,不能传pushviewcontroller

letchatController=ChatLogController()chatController.user=userletnav:UINavigationController=UINavigationController(rootViewController:chatController)self.presentViewController(nav,animated:true,completion:nil)上面的代码有效,我试图在呈现之前将用户传递给下一个ViewController但是,这不起作用,它在下一个ViewController中为用户提供了nil:letchatCon