iOS - EXC 访问错误,以前在 iOS 4 上工作过
除非我疯了,否则这在 iOS4 上可以正常工作。我更新到 iOS5,现在它在 [indexPath 部分]
上抛出此错误访问错误。它位于 UITableView
上:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // Get the cell label and value NSLog(@"section: %@", [indexPath section]); /* BAD ACCESS ERROR HERE */ ...
Unless I'm out of my mind, this was working properly on iOS4. I updated to iOS5, and now it's throwing this bad access error on [indexPath section]
. It's on a UITableView
:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // Get the cell label and value NSLog(@"section: %@", [indexPath section]); /* BAD ACCESS ERROR HERE */ ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
日志语句本身导致了错误。
您正在尝试记录一个整数,就好像它是一个对象一样。应该是:
The log statement itself is causing the error.
You are trying to log an integer as if it was an object. It should be: