Inconsistent type for section in UITableViews
In some places, sections are referred to as NSIntegers
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
But in NSIndexPath, they are clearly defined as NSUIntegers.
section
An index number identifying a section in a table view. (read-only)
@property(readonly) NSUInteger section
Aside from the obvious overflow implications (would have to be a really big table), this creates a lot of annoyance for me since I turn on the Sign Comparison compiler warning option.
Anyone aw开发者_如何转开发are of a valid reason for this, or is it just a bug?
At this point, I'm assuming this is just bad design and dealing with it. Oh well.
精彩评论