Greets,我读到的默认行为UITableView
是当你滚动这些部分直到下一部分将previos部分行推出视图时将部分标题行固定到表的顶部.
我有一个UITableView
内部UIViewController
,这似乎并非如此.
这只是违法行为UITableViewController
吗?
这是基于我所拥有的一些简化代码.我将展示UIController
我实现的接口和每个表视图方法来创建表视图.我有一个帮助器数据源类,可以帮助我索引我的对象以便与表一起使用.
@interface MyUIViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, readonly) UITableView *myTableView;
@property (nonatomic, readonly) MyCustomHelperDataSource *helperDataSource;
@end
//when section data is set, get details for each section and reload table on success
- (void)setSectionData:(NSArray *)sections {
super.sectionData = sections; //this array drives the sections
//get additional data for section details
[[RestKitService sharedClient] getSectionDetailsForSection:someId
success:^(RKObjectRequestOperation *operation, RKMappingResult *details) {
NSLog(@"Got section details data");
_helperDataSource = [[MyCustomHelperDataSource alloc] initWithSections:sections andDetails:details.array]; …
Run Code Online (Sandbox Code Playgroud)