1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      UI中的表視圖用法-創(chuàng)新互聯(lián)

      - (void)viewDidLoad {

      專注于為中小企業(yè)提供做網(wǎng)站、成都做網(wǎng)站服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)襄汾免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了成百上千企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過(guò)網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。

       

        [super viewDidLoad];

        self.data = @[@"Camping", @"Water Skiing", @"Weight Lifting", @"Stamp Collecting"];

       

       

        UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 20) style:UITableViewStylePlain];

        tableView.delegate = self;

        tableView.dataSource = self;

       

       

        // 設(shè)置表視圖的頭部視圖

        UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 50)];

        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(([UIScreen mainScreen].bounds.size.width - 130)/2, 0, 150, 50)];

        label.text = @"HeaderFooter";

        label.textColor = [UIColor whiteColor];

        [headerView addSubview:label];

        headerView.backgroundColor = [UIColor cyanColor];

        tableView.tableHeaderView = headerView;

        [self.view addSubview:tableView];

       

      }

      #pragma mark -UITableViewDataSource

      - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

        return self.data.count;

       

      }

      - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

        UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];

        cell.textLabel.text = (NSString *)self.data[indexPath.row];

        return cell;

      }

      - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{

        return  @"Johnny Appleseed";

      }

      - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{

        return @"wrewrwer";

      }

      //自定義section頭部視圖

      - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{

        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0,0, 120)];

        view.backgroundColor = [UIColor grayColor];

        UIImageView *imgView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 20, 70, 70)];

        imgView.backgroundColor = [UIColor lightGrayColor];

        imgView.p_w_picpath = [UIImage p_w_picpathNamed:@"home_tab_icon_4.png"];

        [view addSubview:imgView];

        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(85, 20, 200, 70)];

        label.font = [UIFont boldSystemFontOfSize:16];

        label.text = @"Johnny Appleseed";

        UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(10, 80, 200, 50)];

        label1.text = @"Hobby Information:";

        [view addSubview:label1];

        [view addSubview:label];

            return view;

      }

      - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{

       

        //添加view

        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 100)];

        view.backgroundColor = [UIColor grayColor];

        //添btn1

        UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom];

        btn1.frame = CGRectMake(([UIScreen mainScreen].bounds.size.width - 240)/3, 30, 120, 40);

        [btn1 setTitle:@"Button1" forState:UIControlStateNormal];

        [btn1 setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];

        btn1.backgroundColor = [UIColor whiteColor];

        [view addSubview:btn1];

       

        //添加btn2

        UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeCustom];

        btn2.frame = CGRectMake(([UIScreen mainScreen].bounds.size.width - 240)/3 *2 + 120, 30, 120, 40);

        [btn2 setTitle:@"Button1" forState:UIControlStateNormal];

        [btn2 setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];

        btn2.backgroundColor = [UIColor whiteColor];

        [view addSubview:btn2];

        return view;

      }

      - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

        return 120;

      }

      - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

        return 100;

      }


      創(chuàng)新互聯(lián)www.cdcxhl.cn,專業(yè)提供香港、美國(guó)云服務(wù)器,動(dòng)態(tài)BGP最優(yōu)骨干路由自動(dòng)選擇,持續(xù)穩(wěn)定高效的網(wǎng)絡(luò)助力業(yè)務(wù)部署。公司持有工信部辦法的idc、isp許可證, 機(jī)房獨(dú)有T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確進(jìn)行流量調(diào)度,確保服務(wù)器高可用性。佳節(jié)活動(dòng)現(xiàn)已開(kāi)啟,新人活動(dòng)云服務(wù)器買多久送多久。


      當(dāng)前題目:UI中的表視圖用法-創(chuàng)新互聯(lián)
      URL標(biāo)題:http://www.ef60e0e.cn/article/dihhcg.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        美姑县| 天峨县| 寿宁县| 班戈县| 武功县| 乌拉特后旗| 东兴市| 横峰县| 繁昌县| 昔阳县| 治多县| 德州市| 巧家县| 平湖市| 南岸区| 沙雅县| 石狮市| 荥经县| 抚顺县| 枣阳市| 安泽县| 汉中市| 稷山县| 子长县| 连城县| 宣城市| 新兴县| 三台县| 巨鹿县| 阜南县| 潼关县| 河曲县| 明星| 商丘市| 新源县| 梁河县| 兴和县| 土默特左旗| 三都| 黔江区| 陈巴尔虎旗|