Reputation: 1175
Hi i am getting this error! i am using NSNumber in indexpath.row but it giving Warning,what is wrong in my code please help.
NSNumber *num=[NSNumber numberWithInt:indexPath.row];
[HUD showWhileExecuting:@selector(callingMethod:) onTarget:self withObject:num animated:YES];
Upvotes: 1
Views: 2067
Reputation: 736
you can use boxed expression. here how you can do :
NSNumber *num = @(indexPath.row]);
[HUD showWhileExecuting:@selector(callingMethod:) onTarget:self withObject:num animated:YES];
this will convert your number with the right format;
Let me know if this help you :)
Upvotes: 2
Reputation: 1411
indexPath.row
is returning NSInteger
value not int
value. Try this
NSNumber *num=[NSNumber numberWithInteger:indexPath.row];
Upvotes: 7