Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- if (!self.tableView){
- self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds
- style:self.tableViewStyle];
- self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- }
- if (!self.tableView.superview){
- [self.view addSubview:self.tableView];;
- }
- if (!self.tableView.delegate){
- self.tableView.delegate = self;
- }
- if (!self.tableView.dataSource){
- self.tableView.dataSource = self;
- }
- if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")){
- self.tableView.rowHeight = UITableViewAutomaticDimension;
- self.tableView.estimatedRowHeight = 44.0;
- }
- if (self.form.title){
- self.title = self.form.title;
- }
- [self.tableView setEditing:YES animated:NO];
- self.tableView.allowsSelectionDuringEditing = YES;
- self.form.delegate = self;
- }
Advertisement
Add Comment
Please, Sign In to add comment