iOS开发时,UITextFiled在点击后选择文本

 UITextField *tf = [UITextFiled alloc] init];   

[[tf valueForKey:@"textInputTraits"] setValue:[UIColorclearColor]

                                           forKey:@"insertionPointColor"];

    [tf selectAll:self];

    [tf setMarkedText:sender.text

        selectedRange:NSMakeRange(0, 0)];

posted @ 2014-03-18 15:58  暴Tyrant君  阅读(322)  评论(0)    收藏  举报