(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSLog(@"bla %@", [section count]);
return [possessions count]; }
Does anyone 开发者_StackOverflowknow how to implement a simple NSLog because I am getting an error.
NSLog(@"bla %d", section)
NSInteger is basically just an int (but with marginally better-known characteristics).
Here is the most used format specifiers:
- %d or % D for integer (int)
- %f for float
- %@ for String (in general)
You can see the other format specifiers here :
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html
section is of type NSInteger. NSInteger type declared variables does'nt have function with name count. You can print section value with below code.
NSLog(@"bla %d",section)
精彩评论