草庐IT

segueing

全部标签

ios - object 不能为 nil - 在 segue 上?

我想在我的代码中做的就是从一个View移动到另一个View。无论我尝试使用多少种不同的方法来绕过它,任何segue或当前View的任何更改都会导致此错误:***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'***-[__NSArrayMinsertObject:atIndex:]:objectcannotbenil'根本没有任何迹象表明它在谈论什么对象,而且应用程序在我的segue行上崩溃了。哦,我正在使用Xcode5-DP和iOS7。这是我的来源:LoginViewController

ios - 使用 UIActionSheetDelegate 执行多个 Segue

我希望通过单个UIBarButtonItem按钮进行多个segue,并根据通过UIActionSheetDelegate的响应,正确的UIViewController将通过pushsegue加载。这是我当前用于UIActionSheetDelegate的代码。-(void)actionSheet:(UIActionSheet*)actionSheetclickedButtonAtIndex:(NSInteger)buttonIndex{if(buttonIndex==0){//ratethisapp}elseif(buttonIndex==1){[selfperformSegueWit

ios - 将 segue 从一个 View Controller 重定向到另一个 View Controller

我找不到这个看似基本问题的答案。假设我有一个Storyboard,其中包含两个ViewControllerA和B,以及从一个ViewController到另一个ViewController的过渡。现在,我创建了一个不同的ViewControllerC,现在想将现有的segue从A重定向到C。我用Ctrl拖,command拖,等等,好像都不行。在真实的应用程序中,我有太多的segues无法尝试从头开始重新创建它们。有没有更简单的方法?这个问题不是标记的重复问题,因为我正在尝试重用现有的segue,而不是直接针对不同的Controller。谢谢! 最佳答案

ios - 在 iOS 中,如何在自定义动画期间延迟自动旋转(segue)

在iOS(版本5很好)中,我有一个自定义动画来翻转和缩放从一个UIViewController到另一个UIViewController的图像转换,使用:TCFlipZoomSubviewSeguesegue=[[TCFlipZoomSubviewSeguealloc]initWithIdentifier:@"SegueToMenuTable"source:self.iViewControllerdestination:self.mViewController];[segueperform];在perform方法中我有:[UIViewanimateWithDuration:3.75fde

ios - Segues 和 viewDidLoad/viewDidUnload 方法

我正在制作简单的Storyboard应用程序,它有2个UIViewControllers,我通过使用模态segue在它们之间切换。每个UIViewController都有一个UIButton,用于执行到另一个UIViewController的segue。在viewDidLoad方法中,我在每个UIViewController上为该UIButton的外观设置动画。我正在使用CrossDissolveModal转场。当我在第一个UIViewController上按下UIButton时,我导航到第二个UIViewController并执行动画并显示第二个UIViewController。在我

iOS AMSlideMenu 接收器 (<MainVC : 0x8f92a90>) has no segue with identifier 'rightMenu' '

我想使用库AMSlideMenu来制作抽屉导航。我看到了YT教程,用它制作了我自己的抽屉导航。问题是,我只想使用左侧菜单,所以我遇到了这个错误,因为它没有找到正确的菜单...我该如何解决?谢谢, 最佳答案 我通过仔细检查我的Segue类是否设置正确来修复此问题。单击TableView和segueView之间的segue链接,并确保已将类设置为“AMSlideMenuContentSegue”和正确的标识符(“firstSegue”、“secondSegue”):在此链接之前,MainVC(或等效)View转至菜单链接的TableVi

objective-c - 以编程方式调用 segue 原因 NSInvalidArgumentException,原因 : 'UILabel length' unrecognized selector

我正在尝试进行有条件的转场。但我得到:Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[UILabellength]:unrecognizedselectorsenttoinstance0x763c8e0'设计是,当我按下按钮时,应用程序将使用AFNetworking的AFJSONRequestOperation从互联网检索一些数据。如果请求成功,它将从我当前的UIViewController调用另一个UIViewController。我使用thismethod进行了条件启动segue以

ios - 在没有 segues 的 View Controller 之间传递数据

我正在使用Storyboard,我有一个加载动态按钮的View。单击此按钮时,我需要加载第二个ViewController并传递数据。我不能使用segue作为它的动态按钮。我使用下面的代码加载第二个ViewControllerUIStoryboard*sb1=[UIStoryboardstoryboardWithName:@"MainStoryboard_iPhone"bundle:nil];UIViewController*vc1=[sb1instantiateViewControllerWithIdentifier:@"SecondViewController"];[self.na

ios - 如何在不通过 segue 实例化的情况下预加载或缓存目标 View Controller

当触发segue时,它​​将启动目标ViewController。有没有一种方法可以预加载或缓存viewcontroller并在触发segue时将其加载到代码中?提前致谢。 最佳答案 使用segues的好处之一是ViewController是为您设置和实例化的。您可以简单地不使用segues,而是自己将VC初始化/推送到导航堆栈。这将允许您随时初始化它,将VC存储为ivar,然后在适当的时候推送它。 关于ios-如何在不通过segue实例化的情况下预加载或缓存目标ViewControll

ios - 如何在不使用 segue 的情况下在 View Controller 之间传递数据

我正在使用Storyboard开发iPad应用程序。在我的应用程序中,我使用segue模态表示从第一个ViewController连接了一个模态视图Controller。通过单击模态视图中出现的一个按钮关闭模态视图。我如何在不使用的情况下将一个字典从模态视图Controller传递到第一个ViewController继续。 最佳答案 您可以使用Notification传递值。//SendDataNSDictionary*aDictionary=[[NSDictionaryalloc]initWithObjectsAndKeys:an