Guest User

Untitled

a guest
Jan 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
  2. {
  3. if (section < self.practiceLessonSet.lessons.count) {
  4. if ([[self.practiceLessonSet.lessons objectAtIndex:section] words].count == 1) {
  5. return @"No replies yet. Try the share button?";
  6. }
  7. }
  8. return nil;
  9. }
  10.  
  11. - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
  12. {
  13. if (self.practiceLessonSet.lessons.count == 0) {
  14. UIImageView *view = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"introPractice"]];
  15. view.contentMode = UIViewContentModeCenter;
  16. return view;
  17. } else
  18. return nil;
  19. }
  20.  
  21. - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
  22. {
  23. if (self.practiceLessonSet.lessons.count == 0)
  24. return 278;
  25. else
  26. // WHAT SHOULD I PUT HERE?
  27. return [super tableView:tableView heightForFooterInSection:section]; // <-- FAILS
  28. }
  29.  
  30. if (section < self.practiceLessonSet.lessons.count) {
  31. if ([[self.practiceLessonSet.lessons objectAtIndex:section] words].count == 1) {
  32. return @"No replies yet. Try the share button?";
  33. }
  34. }
Add Comment
Please, Sign In to add comment