0
votes
  • (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSLog(@"bla %@", [section count]);

    return [possessions count]; }

Does anyone know how to implement a simple NSLog because I am getting an error.

3

3 Answers

3
votes

NSLog(@"bla %d", section)

NSInteger is basically just an int (but with marginally better-known characteristics).

1
votes

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

0
votes

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)