- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我很难让 performSegueWithIdentifier 工作。我不断得到
"Receiver (<UINavigationController: 0x1e59a9d0>) has no segue with
identifier 'identA'"
我所做的是:
步骤:将 View controller A 连接到 View controller B,并使用带有标识符“identA”的 push segue 像这样:
步骤:在 View Controller A 的 ViewDidLoad 上添加了对 performSegueWithIdentifier 的调用。像这样:
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController performSegueWithIdentifier:@"identA" sender:self];
// Do any additional setup after loading the view, typically from a nib.
}
我做错了什么???
最佳答案
您正在 self.navigationController
上调用 performSegueWithIdentifier:sender:
但您在 View controller A
上设置了 segue:
wired View controller A to View controller B with push segue with Identifier "identA"
尝试替换:
[self.navigationController performSegueWithIdentifier:@"identA" sender:self];
与
[self performSegueWithIdentifier:@"identA" sender:self];
关于ios - performSegueWithIdentifier 不产生带有标识符错误的 segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19040941/
我的主视图 Controller 位于导航 Controller 中,它符合 EditViewControllerDelegate 协议(protocol)。这是我需要以模态方式呈现的两个 View
所以我在解决以下问题时遇到了一些棘手的问题。我可以使用 performSegueWithIdentifier使用如下代码在 View Controller 之间跳转: [self performSeg
我在 iOS7 中遇到问题,我用 performSegueWithIdentifier 调用 segue (我有这样的代码,几乎可以在其他任何地方使用),然后我将 segue 记录到 prepareF
我有一个带有按钮的 View Controller ,可以通过 STTwitter 启动 Twitter 登录页面。 . shouldPerformSegueWithIdentifier函数返回 NO
-(void)loginPerform { NSLog(@"start to perform segue!"); [self performSegueWithIdentifier:@"
我只是想问一下如何执行seguewithidentifier并打开一个新 View , 当信标位于应用程序范围内时。 请帮助我并提供示例和文档。谢谢。 最佳答案 您应该查看的教程: Ray Wende
因此,我尝试在窗口加载后立即执行转场,而无需单击按钮或执行任何操作。 Segue 是从 View Controller 链接的,但不是从窗口 Controller 链接的,因为我一次只能从 Windo
我有 6 个不同的表,当选择其中一个表中的行时(在 RegionFirstTable 中,哪个表很重要),我希望它们执行 Segue。 regionsFirstTable 的代码工作正常,但至于其他部
我只是构建了一个类来正确管理我的数据库和 JSON 请求。问题是,现在我该如何执行 segue ? 这是我的代码在我看来: - (IBAction)loginClick:(id)sender {
当我点击一个按钮时,我会运行这段代码: [self performSegueWithIdentifier:@"services" sender:self]; NSLog(@"ButtonClicked
我想通过 performSegueWithIdentifier(self.segueName, sender: products) 传递类型为 [Product] 的名为 products 的数组 我
您好,我正在尝试根据用户的选择推送到不同的 View 。我有一个 TableView ,其中有 4 个其他 View Controller 通过 Storyboard中的推送 segues 链接到它。
我有这样一个问题,当我点击按钮时,performSegueWithIdentifier() 会延迟工作,大约五秒钟,但是当我返回并再次点击按钮时,它会立即工作,没有任何延迟。 我想知道是否有 perf
我正在尝试使用 segue,这是我的代码: if let status_code = response.response?.statusCode { if status_code == 200
我已经阅读了很多关于这个问题的不同帖子,但似乎没有一个解决方案适合我。 我启动了一个新的应用程序,并将初始的 ViewController 放在导航 Controller 中。我创建了第二个 View
我正在 XCode 6 上使用框架 PARSE 设置注册/登录页面。 当我尝试执行一个 segue(它拼写正确)时,悬停,应用程序崩溃,即使 segue 在 if 语句中也是如此。 代码如下: imp
简单的测试显示了 performSegueWithIdentifier 之后的方法可以执行,但是做这个假设是否安全? Apple 文档未提及此主题。 例如,下面代码块中的print 语句在测试中执行。
我有一个项目,其中有一个 Storyboard。 Storyboard包含几个 View Controller 。我将简化它并省略不必要的细节。在 Navigation Controller 中,有几
我有这段代码可以使用信标更新距离。 func updateDistance(distance: CLProximity) { UIView.animateWithDuration(0.8) {
我的应用遇到了这种奇怪的情况。我在主线程上调用 performSegueWithIdentifier : dispatch_async(dispatch_get_main_queue()){
我是一名优秀的程序员,十分优秀!