search

Home  >  Q&A  >  body text

objective-c - Will adding textview to tableviewcell in iOS cause lag?

UIViewController *vc = [[UIViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];

The following is the code in viewDidLoad of vc:

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    _feedbackTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
    [self.view addSubview:_feedbackTableView];
    _feedbackTableView.delegate = self;
    _feedbackTableView.dataSource = self;
    _feedbackTableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
    
    [_feedbackTableView registerClass:[TextViewTableViewCell class] forCellReuseIdentifier:feedbackSuggestCellIdentifier];
    [_feedbackTableView registerClass:[TextFieldTableViewCell class] forCellReuseIdentifier:feedbackContactCellIdentifier];
   
}

TextViewTableViewCell contains a textview
TextFieldTableViewCell contains a textfield
I found that there was an obvious lag in the process of pushing to this vc. Is it caused by this textview?

给我你的怀抱给我你的怀抱2853 days ago545

reply all(0)I'll reply

No reply
  • Cancelreply