Within this method:
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
If I call a NSLog it will print out that log when the UITableViewCell shows on the screen every time. I was just wondering if it’s possible to load this cell once and not reload it every time it appears again. I understand that this isn’t a very efficient design but it’s just on the one cell I need to do it on!
Thanks
Sure. You can create your cell(s) once, say in viewDidLoad:, and return it from tableView: cellForRowAtIndexPath:. cellForRowAtIndexPath will still be called, but you’re only creating/initializing your cell once. If you like you could create all your cells this way and store them in an array. Don’t forget to release these cells when the view unloads.