FastLargeTableViewController.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Non-google3 relative import to support building with Xcode.
  15. #import "FastLargeTableViewController.h"
  16. /** Reuse identifier of cell that displays name of test screen. */
  17. static NSString *const kCellReuseIdentifier = @"CellWithDate";
  18. @interface FastLargeTableViewController ()
  19. @end
  20. @implementation FastLargeTableViewController
  21. - (void)viewDidLoad {
  22. [super viewDidLoad];
  23. self.navigationItem.title = @"Fast Table View";
  24. self.navigationItem.accessibilityLabel = @"Fast Table View";
  25. [self.tableView registerClass:[UITableViewCell class]
  26. forCellReuseIdentifier:kCellReuseIdentifier];
  27. }
  28. #pragma mark - Table view data source
  29. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  30. return 1;
  31. }
  32. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  33. return 10000;
  34. }
  35. - (UITableViewCell *)tableView:(UITableView *)tableView
  36. cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  37. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellReuseIdentifier];
  38. cell.textLabel.text = [[NSDate date] description];
  39. return cell;
  40. }
  41. @end