无法与情节提要建立连接 [英] Trouble making connections with storyboard

查看:55
本文介绍了无法与情节提要建立连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Apple上的您的第二个iOS应用"教程,并且在

I'm running through the "Your Second iOS App" tutorial on Apple, and I'm on this page. If you click on the "To connect the text labels to the detail view controller’s properties . . ." section, it explains how to control-click and connect the label to the Table View Controller button in the scene bar below the canvas. When I do this it doesn't give me an option to name the connection like the tutorial says, it just pops up with the word 'view' and then adds the table view to the list of referencing outlets when I control-click again.

由于系统找不到标签,这显然会使事情不起作用,我该如何建立这些连接,我做错了什么还是本教程错了?他们似乎使用的是Xcode的旧版本,有些小事情并不合适.....我还是想克服它,谢谢您的帮助

This will obviously make things not work since the labels can't be found by the system, how can I make these connections and am I doing something wrong or is the tutorial wrong? They seem to be using an older version of Xcode some little things haven't been right.....I'd just like to get past it though, thanks for any help

推荐答案

编辑

由于它仅显示 view 而不显示类中的属性,因此您可能错过了第一步自定义详细视图控制器头文件..."的一部分.在其中添加了以下几行:

Since it is only showing view and not showing the properties in your class, you either missed the part of the first step "To customize the detail view controller header file . . ." where you added the following lines:

@property (strong, nonatomic) BirdSighting *sighting;
@property (weak, nonatomic) IBOutlet UILabel *birdNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *locationLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;

OR

在设计细节场景"下,您错过了用UITableViewController场景替换默认的UIViewController场景..."下的最后一步.这是:

Under "Design the Detail Scene" you missed the last step under "To replace the default UIViewController scene with a UITableViewController scene . . ." which is:

5. In the Custom Class section of the Identity inspector, choose BirdsDetailViewController in the Class pop-up menu.

这篇关于无法与情节提要建立连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆