使UITableView最上面留出UINavigationBar空间的两种方法

使UITableView最上面留出UINavigationBar空间的两种方法
 
 
使UINavigationBar透明,TableView在其下面,可以扩大UITableView的视野.


1)
        UIView *headerView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, 320, 44)];
        m_tableView.tableHeaderView = headerView;
        

2)
        m_tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0);
        m_tableView.scrollIndicatorInsets = UIEdgeInsetsMake(44, 0, 0, 0);

posted on 2011-06-30 09:42  禚来强  阅读(1173)  评论(0编辑  收藏  举报

导航