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

目录文件如下:

实现代码如下:


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. [Tool] 配置文件之Web.config

    开发人员工具: 安装完vs后,(如2013:C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\VS ...

  2. JS实现简易的计算器

    JS可以做的事多了,那就用来实现一个计算器吧 看看手机中的计算器,分为普通计算器和科学计算器     自认脑袋不够大,就实现一个普通版本的吧(支持正负数加减乘除等基本连续的运算,未提供括号功能) 看看 ...

  3. 前端工程化开发之yeoman、bower、grunt

    上两遍文章介绍了前端模块化开发(以seaJs为例)和前端自动化开发(以grunt为例)的流程,参见: http://www.cnblogs.com/luozhihao/p/4818782.html ( ...

  4. Ajax学习笔记2之使用Ajax和XML

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using Ajax wit ...

  5. iOS阶段学习第12天笔记(类的初始化)

    iOS学习(OC语言)知识点整理 一.类的初始化 1)init初始化方法(构造方法):一般和alloc一起调用,用于给成员变量初始化. 2)id类型:相当于C中的void*,可以指向任何对象,不能加* ...

  6. IOS中Json解析的四种方法

    作为一种轻量级的数据交换格式,json正在逐步取代xml,成为网络数据的通用格式. 有的json代码格式比较混乱,可以使用此“http://www.bejson.com/”网站来进行JSON格式化校验 ...

  7. C#中WinForm窗体事件的执行次序

    C#中WinForm窗体事件的执行次序如下: 当 Windows Form 应用程序启动时,会以下列顺序引发主要表单的启动事件:        System.Windows.Forms.Control ...

  8. UML类图画法及其之间关系

    1.泛化又名继承(Generalization),带空心箭头的实线表示,箭头指向父类 2.实现(Realization),带空心的虚线表示 3.关联(Association),类与类之间的关联,它使一 ...

  9. hibernate3

    hibernate3 (整合到spring中的core核心配置中的hibernate3) <!-- 基于hibernate的Session工厂 --> <bean id=" ...

  10. IT男常用软件网站整理

    1. 猎豹免费WiFI.  属于wifi共享软件.  360免费wifi.. 2. 悟空VPN, 免费VPN.http://www.wkdaili.net/ 3. PLSQL. 4. WinSCP, ...