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--个人资料修改的更多相关文章

  1. iOS Webview 实现修改javascript confirm 和 alert

    贴代码: @interface UIWebView (JavaScriptAlert) -(void) webView:(UIWebView *)sender runJavaScriptAlertPa ...

  2. IOS 学习资料

    IOS学习资料 - 逆天整理 - 精华无密版[最新][精华] 无限互联3G学院 iOS开发视频教程UI 极客学院IOS iPhone 6的自适应布局

  3. iOS 学习资料整理

    iOS学习资料整理 https://github.com/NunchakusHuang/trip-to-iOS 很好的个人博客 http://www.cnblogs.com/ygm900/ 开发笔记 ...

  4. iOS UIView 快速修改 frame,

    在iOS开发布局修改 frame 时需要繁琐的代码实现,今天偶尔看到一播客说到快速修改的 frame 的方法,自己动手写了一遍实现代码. 快速实现主要通过 添加类目的方式,对UIView 控件添加了一 ...

  5. 李洪强iOS开发之-修改状态栏的字体的颜色

    李洪强iOS开发之-修改状态栏的字体的颜色 修改的效果: -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [ ...

  6. iOS开发系列-修改项目工程名

    当前有项目工程名为iOS,需要修改工程名为IFLY.在修改前注意备份项目 修改项目名 出现弹框,点击Rename 修改工程目录文件名 注意Tests与UITests不要删除 选中IFLY.xcodep ...

  7. iOS 学习资料Blog 技术论坛等,不断添加中。。。。

    iOS 学习资料整理 http://www.jianshu.com/p/dc81698a873c    中文 iOS/Mac 开发博客列表  https://github.com/tangqiaobo ...

  8. 兼容iOS 10 资料整理笔记

    原文链接:http://www.jianshu.com/p/0cc7aad638d9 1.Notification(通知) 自从Notification被引入之后,苹果就不断的更新优化,但这些更新优化 ...

  9. 【转】兼容iOS 10 资料整理

    1.Notification(通知) 自从Notification被引入之后,苹果就不断的更新优化,但这些更新优化只是小打小闹,直至现在iOS 10开始真正的进行大改重构,这让开发者也体会到UserN ...

  10. 兼容iOS 10 资料整理

    1.Notification(通知) 自从Notification被引入之后,苹果就不断的更新优化,但这些更新优化只是小打小闹,直至现在iOS 10开始真正的进行大改重构,这让开发者也体会到UserN ...

随机推荐

  1. javascript学习之Function 类型

    1.函数是对象,同样也有属性和方法.由于函数是对象,因此函数名实际上也是一个指向函数对象的指针,不会与某个函数绑定. 2.使用不带圆括号的函数名是访问函数指针,而非调用函数. 3.因为ECMAScri ...

  2. 文件大小K、M、G、T

    function size2mb($size,$digits=2){ //digits,要保留几位小数 $unit= array('','K','M','G','T','P');//单位数组,是必须1 ...

  3. lock

    #ifndef lock_h #define lock_h #include <stdint.h> #include <string.h> #include "myd ...

  4. 如何下载和安装CocoaPods

    朋友自己学习了一段时间就去公司实习了去了之后公司用的是CocoaPods,他一脸茫然的向我求助,我这才想起来写着一遍为了帮助更多的朋友 CocoaPods是什么? 当你开发iOS应用时,会经常使用到很 ...

  5. [并查集] POJ 1611 The Suspects

    The Suspects Time Limit: 1000MS   Memory Limit: 20000K Total Submissions: 35206   Accepted: 17097 De ...

  6. MSP430FR5739串口程序

    今天急着用这个片子的串口,匆忙中调试串口也话费了一段时间,在网上下了一个程序,忽然就把所有问题搞清楚了,只是中断就看着头文件中寄存器写的,虽然通讯正常,不过不确定有没有写错.代码如下: #includ ...

  7. HDU 4944 FSF’s game(2014 Multi-University Training Contest 7)

    思路:  ans[n]=  ans[n-1] + { (n,1),(n,2).....(n,n)}  现在任务 是 计算  { (n,1),(n,2).....(n,n)}(k=n的任意因子) 很明显 ...

  8. HDU--1233--还是畅通工程--并查集

    还是畅通工程 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

  9. 也谈自动化平台的搭建,另附高大上的名字---无人值守定时巡检系统(selenium+testng+ant+jenkins)

    最近公司新项目改版,由于没有运维,开发则负责上线任务,并且都是手动上线,并行的项目多了,分支混乱,经常导致B项目上线覆盖A项目,导致系统不定时出现异常,老板知道了便扣了大家的绩效,作为测试这边必须想个 ...

  10. SSH项目(1)

    1.新建项目,添加jar包 tomcat jsp struts.hibernate.spring 2.配置 web.xml <?xml version="1.0" encod ...