Is it possible to display 4 rows instead of default 3开发者_开发百科 rows in the TTLauncherView?
You can modify the row height with a category if you always use the same number of rows:
@interface TTLauncherView(FourthRow)
@end
@implementation TTLauncherView(FourthRow)
- (CGFloat)rowHeight {
int rows = 4;
return round(_scrollView.height / rows);
}
@end
For me, the default number of rows in TTLauncherView was 4, so I'm not sure why you're seeing only 3. Or do you mean columns (which does default to 3)?
Either way both values are configurable via the columnCount and rowCount properties:
TTLauncherView launcher = [[[TTLauncherView alloc] initWithFrame:self.view.bounds] autorelease];
launcher.rowCount = 3;
launcher.columnCount = 3;
should give you one with both 3 rows and columns
精彩评论