• 微信界面


    @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;

        }

    }

  • 相关阅读:
    中国用户mac上快速安装nodejs
    移动前端的开发痛点
    前端模块化思考
    tcpdump学习
    curl 同时发送多个请求
    apache 做http代理
    文件 FIFO队列
    mysql多表字段名重复的情况
    时间戳实现增量数据同步
    python 学习
  • 原文地址:https://www.cnblogs.com/wujie123/p/5289807.html
Copyright © 2020-2023  润新知