如何将 NSIndexPath 转换为 NSInteger?
我已在此处搜索并找到了此问题的先前答案。问题是标记为解决方案的答案不起作用。在我的 tableView:didSelectRowAtIndexPath: 方法中,我有它
NSInteger *currentRow = indexPath.row;
,它给了我警告“使用‘NSInteger’(又名‘int’)类型的表达式初始化‘NSInteger *’(又名‘int *’)时,整数到指针转换不兼容。”
任何帮助表示赞赏!
I have searched and found a previous answer for this question here. The problem is that the answer marked as a solution does not work. Inside my tableView:didSelectRowAtIndexPath: method, I have
NSInteger *currentRow = indexPath.row;
and it gives me the warning 'Incompatible integer to pointer conversion initializing 'NSInteger *'(aka 'int *') with an expression of type 'NSInteger' (aka 'int').
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NSInteger 不是一个类,因此不需要星号:
NSInteger is not a class, so it doesn't need an asterisk: