草庐IT

segueing

全部标签

iphone - Storyboard和 Segue - 传递数据我做得好吗?

我正在使用Storyboard和转场。我想从“联系人列表”(tableView)切换到“个人资料View”(ScrollView)。三个问题:这是最好的方式(更干净、更漂亮)吗?&为什么?当我这样做时:ProfileViewController*aProfileView=(ProfileViewController*)[seguedestinationViewController];这是实例化一个新View吗?(喜欢它会创建2个个人资料View)。我需要清理(删除某处的“配置文件View”吗?)还是单独使用导航Controller清理?//代码-(void)prepareForSegu

ios - Segue 总是加载新的 View 实例

我正在执行这样的segue;[selfperformSegueWithIdentifier:@"showSecondView"sender:self];但行为是它将始终“加载”新View,而不是显示已加载的现有View。我的问题是,我如何在加载View后将其保存在内存中,以便将来的segue调用将简单地“显示”现有View?谢谢编辑:这是我的用户界面设计。它本质上是一个带有UIView(大灰色block)的自定义侧边栏ViewController,其中放置了所有subview。 最佳答案 简短的回答是iOS不太适合,但您可以这样做。

iphone - 有谁知道如何解决从 UIModalTransitionStylePartialCurl segue 退出时未触发 viewDidAppear 的问题?

有谁知道如何避免viewDidAppear在退出UIModalTransitionStylePartialCurlsegue时不被击中?-(IBAction)buttonSelector:(id)sender{//creatingobjectfortitlescreenUIStoryboard*storySelection=[UIStoryboardstoryboardWithName:@"MainStoryboard"bundle:nil];//creatingobjectforprofileviewselectorViewController=[storySelectioninst

IOS 双击触发 2 segues

我目前正在开发基于https://github.com/stefanoa/SASlideMenu的ios应用程序(副菜单类)和Storyboard。在我的右侧菜单上,我已将一个按钮与自定义转场(SASlideMenuPushSegue)连接起来。这在正常使用中工作正常,但如果我在按钮上敲击的速度足够快,我可以设法推送更多View。例如,如果我双击按钮,将推送2个View。我不知道它来自哪里。这是转场代码:-(void)perform{SASlideMenuRightMenuViewController*source=self.sourceViewController;SASlideMe

ios - 非常奇怪的崩溃报告,我无法重现关于 segues 的内容

我在Crashlytics中遇到此错误:FatalExceptionNSGenericExceptionCouldnotfindanavigationcontrollerforsegue'PlanToBusiness'.PushseguescanonlybeusedwhenthesourcecontrollerismanagedbyaninstanceofUINavigationController.我在应用程序的一个地方只有那个segue。这是它的代码。-(void)performPlanToBusinessSegueOnMainThread{[spinnerstopAnimatin

ios - 导航回父场景时解除 segue 问题

我正在尝试从一个场景中解开segue。它工作正常,但我需要为父屏幕获取一个值。(我使用pushsegue从父场景导航到子场景)我这样调用unwindsegue-(IBAction)done:(UIStoryboardSegue*)segue{NSLog(@"gonnanavigate");RESTToppingTableViewController*vc=[seguedestinationViewController];[selfsetSelectedToppings:[vctoppingList]];NSLog(@"%@",[vctoppingList]);}但问题是,似乎toppi

ios - SpriteKit - CPU/Memory leak on segue back to main screen

我有一个应用程序,其中有一个SpriteKit游戏和一个主菜单。单击主页按钮后,CPU/内存不会减少。我已经尝试了一些东西,这里的代码可能是多余的,但它还没有为我工作。每当触摸主页按钮时执行:-(void)goToMainMenu{[selfperformSegueWithIdentifier:@"mainmenu"sender:self];[self.spriteViewremoveFromSuperview];self.scene=nil;[self.spriteViewpresentScene:nil];self.spriteView=nil;self.view=nil;}从主菜

ios - 导航栏在自定义展开 segue 的动画中不可见

我在导航Controller中使用自定义展开转场,在转场动画中,导航栏在动画期间不可见,当动画结束时导航栏“弹出”。¿如何在动画期间保持导航栏的可见性?更多详情:我在导航栏中有一个按钮调用模态视图这个动画按预期执行,新View有一个按钮来触发展开segue动画View增长和消失,而这个动画正在执行导航栏在动画完成之前,目标ViewController不可见。这是我用于自定义转场的代码。-(void)perform{UIViewController*sourceViewcontroller=self.sourceViewController;UIViewController*destin

iOS:以编程方式将 Segue 推送到多个 View Controller

我有一个原始ViewController和四个目标ViewController。我希望能够使用导航Controller推送segue到所有目标ViewController。我试过了……-(IBAction)notificationsButtonPushed:(id)sender{NotificationsViewController*notifications=[[NotificationsViewControlleralloc]init];[self.navigationControllerpushViewController:notificationsanimated:YES];}

ios - 显示没有 segue 的弹出 View Controller

假设我有CatViewController、CatDetailViewController和RegisterViewController的MVC;其中RegisterViewController是一个弹出窗口,因为它不会覆盖整个屏幕。我的设计是这样的,用户可以从CatViewController转到CatDetailViewController。但是,如果用户尚未注册,则segue会被中断,并要求用户通过弹出RegisterViewController进行注册。我的猜测是根据这样的设计我无法继续到RegisterViewController。我不知道这个假设是否正确。那么有人知道这种设