EleOneTableVC.m 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // EleOneTableVC.m
  3. // JSJPCoach
  4. //
  5. // Created by EchoShacolee on 2018/1/30.
  6. // Copyright © 2018年 Danson. All rights reserved.
  7. //
  8. #import "EleOneTableVC.h"
  9. #import "EleOneCell.h"
  10. @interface EleOneTableVC ()
  11. @end
  12. @implementation EleOneTableVC
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. self.kemuStr = @"1";
  16. [self getData];
  17. [self.tableView registerNib:[UINib nibWithNibName:@"EleOneCell" bundle:nil] forCellReuseIdentifier:@"cellId"];
  18. self.tableView.estimatedRowHeight = 178;
  19. }
  20. - (void)didReceiveMemoryWarning {
  21. [super didReceiveMemoryWarning];
  22. // Dispose of any resources that can be recreated.
  23. }
  24. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  25. EleOneCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellId" forIndexPath:indexPath];
  26. cell.kemu = 1;
  27. cell.dataDic = self.dataurce[indexPath.row];
  28. return cell;
  29. }
  30. /*
  31. // Override to support conditional editing of the table view.
  32. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
  33. // Return NO if you do not want the specified item to be editable.
  34. return YES;
  35. }
  36. */
  37. /*
  38. // Override to support editing the table view.
  39. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
  40. if (editingStyle == UITableViewCellEditingStyleDelete) {
  41. // Delete the row from the data source
  42. [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
  43. } else if (editingStyle == UITableViewCellEditingStyleInsert) {
  44. // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
  45. }
  46. }
  47. */
  48. /*
  49. // Override to support rearranging the table view.
  50. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
  51. }
  52. */
  53. /*
  54. // Override to support conditional rearranging of the table view.
  55. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
  56. // Return NO if you do not want the item to be re-orderable.
  57. return YES;
  58. }
  59. */
  60. /*
  61. #pragma mark - Navigation
  62. // In a storyboard-based application, you will often want to do a little preparation before navigation
  63. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  64. // Get the new view controller using [segue destinationViewController].
  65. // Pass the selected object to the new view controller.
  66. }
  67. */
  68. @end