【发布时间】:2013-04-26 06:16:38
【问题描述】:
我在部分标题中添加了一个按钮,该按钮显示点击它的视图。我的需要是在显示视图时显示“向上箭头”图像,在隐藏视图时显示“向下箭头”图像。
我怎样才能做到这一点?请帮帮我...
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
[btn setFrame:CGRectMake(0, 0, 316, 60)];
[btn setTag:section];
[aView addSubview:btn];
[btn addTarget:self action:@selector(sectionTapped:) forControlEvents:UIControlEventTouchDown];
btn.backgroundColor=[UIColor clearColor];
}
【问题讨论】:
标签: ios uitableview uibutton