8

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!

Community
  • 1
  • 1
tarheel
  • 4,727
  • 9
  • 39
  • 52

1 Answers1

22

NSInteger is not a class, so it doesn't need an asterisk:

NSInteger currentRow = indexPath.row;
iii
  • 1,594
  • 1
  • 9
  • 8
  • 1
    also very useful is to track the index.row by assigning it to a yourView.tag or yourLabel.tag so you can access information from custom cells and the like...so it would be yourTextView.tag = indexPath.row – whyoz Oct 03 '13 at 00:50