2013-02-11 2 views

ответ

1

Вы можете получить доступ к представлению заголовка таблицы по следующему коду.

UIView *headerView = self.tableView.tableHeaderView; 

И вы можете добавить кнопку для этого вида.

+0

Я пробовал использовать следующий код в viewdidload. но ничего не происходит UIView * headerView = self.tblView.tableHeaderView; UIButton * btn = [[UIButton alloc] initWithFrame: CGRectMake (250, 0, 50, 30)]; btn.backgroundColor = [UIColor redColor]; [headerView addSubview: btn]; – manujmv

+0

Можете ли вы показать свой код в 'viewDidLoad'? – Ilanchezhian

+0

actInd = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleGray]; actInd.frame = CGRectMake (self.view.frame.size.width/2, (SCRN_HEIGHT-120)/2, 10, 10); [self.view addSubview: actInd]; [actInd startAnimating]; tempImages = [[NSMutableDictionary alloc] init]; self.title = [[JsonModel sharedJsonModel] title]; tblView.separatorStyle = UITableViewCellSeparatorStyleNone; tblView.rowHeight = 100; tblView.backgroundColor = [UIColor clearColor]; imgView.image = [UIImage imageNamed: @ "gradientBackground"]; – manujmv

Смежные вопросы