【发布时间】:2011-05-10 09:43:17
【问题描述】:
好的,我很难接受。我已经搜索了过去一个小时,但我不明白我做错了什么。我正在尝试获取发件人的 currentTitle,然后将其转换为整数,以便在调用列表时使用它。
NSString *str = [sender currentTitle];
NSInteger *nt = [str integerValue]; // this is where the error appears //
NSString *nextScreen = [NSString stringWithFormat:@"Screen_%@.jpg", [screenList objectAtIndex:nt]];
我认为这是 [str integerValue] 位未正确使用的问题,但我找不到有效的示例。
谢谢!
【问题讨论】:
标签: objective-c pointers ios