Closed Hoikiiz closed 6 years ago
@property (weak, nonatomic) UITableView *tableView;
(UITableView )tableView { if (_tableView == nil) { UITableView tableView = [[UITableView alloc] initWithFrame:self.view.bounds style: UITableViewStylePlain]; [self.view addSubview: tableView]; tableView.backgroundColor = [UIColor orangeColor]; _tableView = tableView; } return _tableView; }
(void)viewDidLoad { [super viewDidLoad]; [self tableView]; }
properties are not swizzled by injection.
Fine,thanks any way
@property (weak, nonatomic) UITableView *tableView;
(UITableView )tableView { if (_tableView == nil) { UITableView tableView = [[UITableView alloc] initWithFrame:self.view.bounds style: UITableViewStylePlain]; [self.view addSubview: tableView]; tableView.backgroundColor = [UIColor orangeColor]; _tableView = tableView; } return _tableView; }
(void)viewDidLoad { [super viewDidLoad]; [self tableView]; }