在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/C/ OC仿支付寶我的界面。

OC仿支付寶我的界面。

自已的視圖下拉時(shí),會(huì)出現(xiàn)tableView的背景色,和tableView.headerView與Navbar的顏色不一樣。
但如果tableView的背景色設(shè)為和Navbar的一樣,那tableView下面的section的顏色又很難看了。

上代碼:

        UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KYScreenWidth, KYScreenHeight) style:UITableViewStyleGrouped];
        tableView.delegate = self;
        tableView.dataSource = self;
        tableView.backgroundColor = KYCommonBgColor;
        tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
        tableView.sectionHeaderHeight = 20;
        tableView.sectionFooterHeight = 0;
        tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
        [self.view addSubview:tableView];
        _tableView = tableView;
        
        
        UIImageView *backView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.ky_width, 80)];
        backView.image = [UIImage createImageWithColor:KYNavbarColor];
        backView.userInteractionEnabled = YES;
        _tableView.tableHeaderView = backView;

支付寶效果:
支付寶效果

我的效果:
我的效果

回答
編輯回答
貓小柒

你好,有demo嗎,能說(shuō)下怎么實(shí)現(xiàn)的嗎?拜謝。。。

2017年11月5日 16:16
編輯回答
掛念你

已經(jīng)換了另一種方式,去掉了原生NavigationBar,自己模擬了一個(gè)

2017年6月7日 14:03