本文主要实现了微信的个人主页的设置:

目录文件如下:

实现代码如下:


RootTableViewController.h

#import <UIKit/UIKit.h>
@interface RootTableViewController : UITableViewController
@property(strong,nonatomic) NSArray *arrtitle;
@property(strong,nonatomic) NSArray *arrimage; @end

RootTableViewController.m

#import "RootTableViewController.h"

@interface RootTableViewController ()

@end

@implementation RootTableViewController

- (void)viewDidLoad {
[super viewDidLoad]; self.title=@"我";
self.arrtitle=@[@"相册",@"收藏",@"钱包",@"卡包"];
self.arrimage=@[@"MoreMyAlbum@3x",@"MoreMyFavorites",@"MoreMyBankCard@3x",@"PayCarddetailVirtualIcon@2x"]; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"mycell"];
self.tableView.scrollEnabled=NO; } - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return ;
} - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section==) {
return ;
}else if (section==){
return ;
}else{
return ;
}
} - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"mycell" forIndexPath:indexPath];
if (indexPath.section==) {
cell.textLabel.numberOfLines=;
cell.textLabel.text=@"往事随风 \r\n微信号: angle-l-520";
cell.imageView.frame=CGRectMake(, , , );
cell.imageView.image=[UIImage imageNamed:@"a.jpeg"]; //添加二维码照片
UIImageView *a=[[UIImageView alloc]initWithFrame:CGRectMake(, , , )];
[a setImage:[UIImage imageNamed:@"add_friend_myQR"]];
[tableView addSubview:a]; }else if (indexPath.section==){
cell.textLabel.text=self.arrtitle[indexPath.row];
cell.imageView.image=[UIImage imageNamed:self.arrimage[indexPath.row]];
}else if(indexPath.section==){
cell.textLabel.text=@"表情";
cell.imageView.image=[UIImage imageNamed:@"MoreExpressionShops@3x"]; }else{
cell.textLabel.text=@"设置";
cell.imageView.image=[UIImage imageNamed:@"MoreSetting@3x"];
} if (indexPath.section==) {
cell.accessoryType=UITableViewCellAccessoryNone;
}else{
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
} return cell;
} -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(nonnull NSIndexPath *)indexPath
{
if (indexPath.section==) {
return ;
}
return ;
}
.....
@end

AppDelegate.h

#import <UIKit/UIKit.h>
#import "RootTableViewController.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window.rootViewController=[[UINavigationController alloc] initWithRootViewController:[[RootTableViewController alloc] initWithStyle: UITableViewStyleGrouped ]]; return YES;
} @end

效果图如下:

iOS--(UITableViewCell)、(UITableViewController)微信个人主页的更多相关文章

  1. iOS UITableViewCell UITableVIewController 纯代码开发

    iOS UITableViewCell UITableVIewController 纯代码开发 <原创> .纯代码 自定义UITableViewCell 直接上代码 ////// #imp ...

  2. iOS开发之微信聊天页面实现

    在上篇博客(iOS开发之微信聊天工具栏的封装)中对微信聊天页面下方的工具栏进行了封装,本篇博客中就使用之前封装的工具栏来进行聊天页面的编写.在聊天页面中主要用到了TableView的知识,还有如何在俩 ...

  3. iOS开发之微信聊天工具栏的封装

    之前山寨了一个新浪微博(iOS开发之山寨版新浪微博小结),这几天就山寨个微信吧.之前已经把微信的视图结构简单的拖了一下(IOS开发之微信山寨版),今天就开始给微信加上具体的实现功能,那么就先从微信的聊 ...

  4. 如何在ios中集成微信登录功能

    在ios中集成微信的登录功能有两种方法 1 用微信原生的api来做,这样做的好处就是轻量级,程序负重小,在Build Settings 中这样设置 然后设置 友盟的设置同上,但是要注意,加入你需要的所 ...

  5. 解决ios下的微信打开的页面背景音乐无法自动播放

    后面的项目发现,还有两个坑,需要注意下: ·本文的解决方案的核心是利用了 微信/易信 在ready的时候会有个 WeixinJSBridgeReady/YixinJSBridgeReady事件,通过监 ...

  6. ios设备突破微信小视频6S限制的方法

    刷微信朋友圈只发文字和图片怎能意犹未竟,微信小视频是一个很好的补充,音视频到位,流行流行最流行.但小视频时长不能超过6S,没有滤镜等是很大的遗憾.but有人突破限制玩出了花样,用ios设备在朋友圈晒出 ...

  7. iOS 7 新版微信 URL 不支持跳转 App Store 的解决方案

    今天早上刚到公司,就收到反馈说公司前端页面的下载按钮在 iOS 7 的微信内置浏览器里面点击无效,经过确认之后,前端代码是正常的,问题出在了微信上,然后谷歌之,原来腾讯在***. 是 BUG 还是刻意 ...

  8. js监测设备类型【安卓,ios,苹果微信,电脑pc】

    话不多说上代码: 1.判断是不是微信 function is_weixn(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/Mic ...

  9. 判断浏览器环境(QQ,微信,安卓设备,IOS设备,PC微信环境,移动设备)

    判断浏览器环境(QQ,微信,安卓设备,IOS设备,PC微信环境,移动设备) // ===== 判断浏览器环境 ===== // // 判断是否是QQ环境 function isQQ() { retur ...

  10. egret 篇——关于ios环境下微信浏览器的音频自动播放问题

    前段时间公司突然想用egret(白鹭引擎)做一个金币游戏,大半个月边看文档边写吭哧吭哧也总算是弄完了.期间遇到一个问题,那就是ios环境下微信浏览器的音频自动播放问题. 个人感觉吧,egret自己封装 ...

随机推荐

  1. Stream Player control

    In this article you will find an implementation of a stream player control. Download WPF demo - 11 M ...

  2. C# HTTP上传文件

    代码: /// <summary> /// Http上传文件 /// </summary> public static string HttpUploadFile(string ...

  3. LINQ的Expression与delegate表达式

    Linq的delegate表达式,Insus.NET觉得它封装得好,让开发时简化了很多代码,而且容易阅读与检索. 比如,我们需要计算优惠给客户金额,打85%折,可以这样写: using System; ...

  4. C#获取执行存储过程的" 返回值"代码

    以下是C#代码: /// <summary> /// 执行存储过程,返回" 返回值" /// </summary> /// <param name=& ...

  5. Java总结篇系列:Java多线程(二)

    本文承接上一篇文章<Java总结篇系列:Java多线程(一)>. 四.Java多线程的阻塞状态与线程控制 上文已经提到Java阻塞的几种具体类型.下面分别看下引起Java线程阻塞的主要方法 ...

  6. MSCRM 获取列表所选记录相关信息

    问题:如何通过JS获取列表中所选记录信息? 解决办法: The CRM2011 Ribbon has a special set of parameters called 'CrmParameters ...

  7. cookies

    Cookie[] cookies=request.getCookies(); for(Cookie c:cookies) out.println(c.getValue()+" ") ...

  8. linux_shell_4_shell特性

    去年的这个时候,我曾经写过一些关于shell特性的文章,下面是第3篇:linux_shell_3_shell变量特性. 今天我们继续来学习一些关于 Linux shell的内容. [1]shell 在 ...

  9. linux 下运行多个tomcat

    首先把tomcat解压到linux 文件夹下:如/usr/local下 #vi(gedit) /etc/profile 在其中加入 ##########first tomcat########### ...

  10. Hibernate框架(未完待续······)

        作为SSH三大框架之一的Hibernate,是用来把程序的Dao层和数据库打交道用的,它封装了JDBC的步骤,是我们对数据库的操作更加简单,更加快捷.利用Hibernate框架我们就可以不再编 ...