带自定义UIView的UITableView headerView

时间:2015-01-29 00:54:17

标签: ios uitableview

YJHomeViewContoller.m

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    return [YJHeaderView view];
}

YJHeadView.m:

+ (instancetype)view
{
    YJHeaderView *view = [[[NSBundle mainBundle] loadNibNamed:@"YJHeaderView" owner:nil options:nil] lastObject];
}

YJHeaderView是我的自定义视图,我使用xib来描述.YJHeaderView中有一个UISWitch。问题是当我运行应用程序时,UISwitch无法触及。

0 个答案:

没有答案
相关问题