iOS 微信頁面設(shè)計

 #import "rootTableViewController.h"

 @interface rootTableViewController ()
 @property(strong,nonatomic)NSArray *arrTitle;
 @property(strong,nonatomic)NSArray *arrImage;
 @end

 @implementation rootTableViewController

 - (void)viewDidLoad {
[super viewDidLoad];
self.title=@"我";
self.navigationController.navigationBar.backgroundColor=[UIColor blackColor];
self.arrTitle=@[@"相冊",@"收藏",@"錢包",@"卡包"];
self.arrImage=@[@"MoreMyAlbum@2x.png",@"MoreMyFavorites@2x.png",@"MoreMyFavorites@2x.png",@"PayCarddetailVirtualIcon.png"];
[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 4;
}

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

if (section==0) {
    return 1;
}
else if (section==1){
    return 4;
}
else
{
    return 1;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellInent=@"mycell";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellInent forIndexPath:indexPath];
if (indexPath.section==0) {
    cell.textLabel.numberOfLines=2;
    cell.textLabel.text=@"XXX  \r\n微信號:11361189";
    cell.imageView.image=[UIImage imageNamed:@"a.jpeg"];
    UIImage *im=[UIImage imageNamed:@"add_friend_myQR"];
    UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, im.size.width, im.size.height)];
    [button setImage:im forState:UIControlStateNormal];
    cell.accessoryView=button;
}
else if (indexPath.section==1)
{
    cell.textLabel.text=self.arrTitle[indexPath.row];
    cell.imageView.image=[UIImage imageNamed:self.arrImage[indexPath.row]];
    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
}
else if (indexPath.section==2)
{
    cell.textLabel.text=@"表情";
    cell.imageView.image=[UIImage imageNamed:@"MoreExpressionShops"];
    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
}
else
{
    cell.textLabel.text=@"設(shè)置";
    cell.imageView.image=[UIImage imageNamed:@"MoreSetting"];
    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
}

return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section==0) {
    return 100.0;
}else
{
    return 40.0;
}
屏幕快照 2016-03-17 下午10.10.16.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容