首页 > 移动平台 > 详细

ios--个人资料修改

时间:2016-03-09 17:37:45      阅读:463      评论:0      收藏:0      [点我收藏+]
  1. 点击进行编辑
    技术分享?
    (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CustomCellIdentifier = @CustomCellIdentifier;

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CustomCellIdentifier];

    if (cell == nil) {
    cell = [[UITableViewCell alloc]
    initWithStyle:UITableViewCellStyleDefault
    reuseIdentifier:CustomCellIdentifier];
    }

    for (UIView *subview in cell.contentView.subviews) {
    [subview removeFromSuperview];
    }

    UILabel *descLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 10, 75, 30)];
    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(85, 10, 150, 30)];
    textField.returnKeyType = UIReturnKeyDone;
    textField.clearButtonMode = UITextFieldViewModeWhileEditing;

    textField.delegate = self;
    descLabel.font = [UIFont systemFontOfSize:18];
    textField.font = [UIFont systemFontOfSize:16];

    if ([indexPath row] == 0)
    {
    descLabel.text = @昵称;
    textField.placeholder = @请输入昵称;
    textField.tag = 0x1001;
    textField.text = [HttpService getInstance].userBaseInfo.nickName;
    }
    else if([indexPath row] == 1)
    {
    descLabel.text = @手机;
    textField.placeholder = @请输入手机号;
    textField.tag = 0x1002;
    textField.text = [HttpService getInstance].userBaseInfo.phone;
    }
    else if([indexPath row] == 2)
    {
    descLabel.text = @QQ;
    textField.placeholder = @请输入QQ号;
    textField.tag = 0x1003;
    textField.text = [HttpService getInstance].userBaseInfo.qq;
    }
    else if([indexPath row] == 3)
    {
    descLabel.text = @支付宝;
    textField.placeholder = @请输入支付宝账号;
    textField.tag = 0x1004;
    textField.text = [HttpService getInstance].userBaseInfo.alipayId;
    }
    else if([indexPath row] == 4)
    {
    descLabel.text = @推荐人;
    textField.placeholder = @请输入推荐人账号;
    textField.tag = 0x1005;
    textField.text = [HttpService getInstance].userBaseInfo.referee;

    if (textField.text.length > 0) {
        textField.enabled = NO;
    }
    

    }

    [cell.contentView addSubview:descLabel];
    [cell.contentView addSubview:textField];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;

    return cell;
    }
    技术分享?
    点击事件
    技术分享?

ios--个人资料修改

原文:http://www.cnblogs.com/cararila/p/zi-liao-xiu-gai.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!