Я пытаюсь добавить UIButton к Tableview, однако, когда я делаю следующее:добавление UIButton к Tableview headerView
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frameWidth, 200)];
UIButton *addSource = [UIButton buttonWithType:UIButtonTypeCustom];
[addSource addTarget:self action:@selector(addBoard:) forControlEvents:UIControlEventTouchUpInside];
[addSource setImage:[UIImage imageNamed:@"addsource.png"] forState:UIControlStateNormal];
[addSource setBackgroundColor:[UIColor grayColor]];
[headerView addSubview:addSource];
self.tableView_.tableHeaderView = headerView;
Я не видел UIButton там. Когда я пытаюсь использовать UILabel, он есть. Почему это?
что вы имеете в виду мой ADDSOURCE не имеет ни одного кадра? – xonegirlz
вы забыли установить кадр. try '[addSource setFrame: CGRectMake (0,0,20,20)]' –