XCode在符合协议的情况下是否能够实现Code Sense?
所以 XCode 一直让我发疯。当使用选择器或表视图编写 iPhone 应用程序时,当我声明控制器符合 DataSource 和 Delegate 方法时,XCode 不会为这些各自的方法生成代码感知,这让我发疯考虑到其中一些内容有多冗长..
比如 -(NSInteger) tableView: (UITableView *) tableView indentationLevelForRowAtIndexPath: (NSIndexPath *) indexPath;
..我不想每次实现它时都必须输入它。是否有我错过的设置,或者在您声明遵循协议来生成代码感知后,XCode 不会深入研究协议?
So XCode has been driving me crazy.. When writing iPhone apps using pickers or table views, when I state that the controller conforms to the DataSource and Delegate methods, XCode isn't generating code sense for those respective methods, and it's driving me nuts given how wordy some of them are..
Like -(NSInteger) tableView: (UITableView *) tableView indentationLevelForRowAtIndexPath: (NSIndexPath *) indexPath;
..I don't want to have to type that out every time I implement that. Is there a setting I've missed, or does XCode not dive into a protocol after you state you conform to it to generate code sense?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然不是现在。
Not now, apparently.
我现在正在调查这个问题。我也很困惑,为什么没有提供您将在周日使用 10 种方法的所有主要代表事务的片段。我最近为 UITableViewDataSourceDelegate 做了一个片段,这是非常值得的。昨晚浪费了大量时间试图在集合视图单元格上弹出编辑菜单,最终成为文档中没有确切所需语法的委托方法。
这是如何运作的非常清楚。两个选择(不是非此即彼,两者都应该支持):
这是 Eclipse 真正击败 Xcode 的最后一个领域。我不明白为什么不愿意一劳永逸地关上门。
I am looking into this right now. I am also baffled as to why there are not snippets for all the major delegate things you are going to use 10 ways to Sunday. I did a snippet recently for UITableViewDataSourceDelegate and that is very worthwhile. Wasted a bunch of time trying to get an Edit Menu to popup on a collection view cell last night that ended up being delegate methods in the docs not having the exact required syntax.
It is super clear how this should work. Two choices (not either/or, both should be supported):
This is the last area in which eclipse really trounces Xcode. I don't understand the reluctance to just slam the door on this once and for all.