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;

        }

    }

  • 相关阅读:
    EventBus总结(原)
    StarUML 破解方法2.X(转)
    扩展阿里巴巴Java开发规约插件(转)
    Java 代码规范,你应该知道的一些工具和用法(转)
    使用IntelliJ IDEA 15和Maven创建Java Web项目(转)
    Git--将已有的项目添加到github(转)
    单元测试汇总
    Intellij idea创建javaWeb:实现JSP/Servlet(转)
    设计模式学习之中介者模式(转)
    jvm加载包名和类名相同的类的规则,以及如何加载包名和类名相同的类(转)
  • 原文地址:https://www.cnblogs.com/wujie123/p/5289807.html
Copyright © 2011-2022 走看看