zoukankan      html  css  js  c++  java
  • 微信界面

    @interface RootTableViewController : UITableViewController

    @property (strong,nonatomic) NSArray *arrTitle;

    @property (strong,nonatomic) NSArray *arrImages;

    @end

    - (void)viewDidLoad {

        [super viewDidLoad];

        

        self.title = @"我";

        self.arrTitle = @[@"相册",@"收藏",@"钱包",@"卡包"];

        self.arrImages = @[@"MoreMyAlbum@2x.png",@"MoreMyFavorites@2x.png",@"MoreMyBankCard@2x.png",@"PayCarddetailVirtualIcon.png"];

        

        [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"reuseIdentifier"];

        //锁定

        self.tableView.scrollEnabled = NO;

        //设置前景色

        self.navigationController.navigationBar.barTintColor = [UIColor grayColor];

        //设置字体颜色及字体大小

        [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont systemFontOfSize:20 weight:10]}];

        

        

       }

    - (void)didReceiveMemoryWarning {

        [super didReceiveMemoryWarning];

        // Dispose of any resources that can be recreated.

    }

    #pragma mark - Table view data source

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

        return 4;

    }

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

        if (section == 0) {

            return 1;

        }

        else if (section == 1){

            return 4;

        }

        else{

            return 1;

        }

            

        return 0;

    }

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

        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reuseIdentifier" forIndexPath:indexPath];

        

        

        if (indexPath.section == 0) {

            cell.textLabel.numberOfLines = 2;

            cell.textLabel.text = @"XXX  微信号是:lanco";

            cell.imageView.image = [UIImage imageNamed:@"a.jpeg"];

        }

        else if (indexPath.section == 1){

            cell.textLabel.text = self.arrTitle[indexPath.row];

            cell.imageView.image = [UIImage imageNamed:self.arrImages[indexPath.row]];

        }

        else if (indexPath.section == 2){

            cell.textLabel.text = @"表情";

            cell.imageView.image = [UIImage imageNamed:@"MoreExpressionShops"];

        }

        else

        {

            cell.textLabel.text = @"设置";

            cell.imageView.image = [UIImage imageNamed:@"MoreSetting"];

        }

        

        if (indexPath.section == 0) {

            UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width - 60, 30, 25, 20)];

            imageView.image = [UIImage imageNamed:@"add_friend_myQR"];

            

            [cell.contentView addSubview:imageView];

        }

        else{

            

            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

            

        }

        return cell;

    }

    -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

    {

        if (indexPath.section == 0) {

            return 80;

        }

        else{

            return 40;

        }

    }

  • 相关阅读:
    mysql-Invalid use of group function-聚合函数不能直接使用在where后面-使用exists,外查询与子查询应条件关联
    python-数据库之pymysql模块(连接对象-游标对象-执行-获取值或者提交事务)
    python作业-99乘法表作业,注意制表符合print结束符以及外层和里层怎么确定的,以及闰年
    python学习笔记-if_while_for_break_continue
    python-python中的Debug大法
    python-常用的几种格式化方法
    python学习一周总结
    python学习笔记-列表,字典,以及函数返回值
    python-注释,变量命名和规范笔记
    OpenJudge 求重要逆序对数
  • 原文地址:https://www.cnblogs.com/wujie123/p/5289807.html
Copyright © 2011-2022 走看看