开发者

Why do I get a "conflicting type" warning when I implement didSelectRowAtIndexPath:

I'm implementing the didSelect开发者_如何转开发RowAtIndexPath: method in a tableviecontroller implementation. I get a "conflicting type" warning in my code. Everything seems to work, but the warning bugs me. The code in my implementation file is as follows.

- (void *)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath {

Originally I had a return type of (NSIndexPath *), but found the type should be void as stated in UITableView.h. Both return types have the same effect. The code works, but I get the following warning...

warning: conflicting types for '-(void)tableview:(UITableView *)tableView...

Thank you for any help you can give...


Your return type should be void, not void *, as stated in the UITableViewDelegate documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜