你的位置:首页 > 软件开发 > 操作系统 > UITextFeild的用法

UITextFeild的用法

发布时间:2016-03-29 00:00:19
一. 修改占位字符串的 颜色:=======方法一 ======================================#import "ViewController.h"#import "MyTextField.h"@interf ...

一. 修改占位字符串的 颜色:

=======方法一 ======================================

#import "ViewController.h"@interface ViewController ()@implementation ViewController- (void)viewDidLoad {- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event@end

 

运行效果:

      1. 没有进入编辑状态效果(textF.leftView = btn;隐藏):

   UITextFeild的用法

 

 

  2. 进入编辑状态效果(textF.leftView = btn;出现):

          UITextFeild的用法

 

#import "ViewController.h"@interface ViewController ()@implementation ViewController- (void)viewDidLoad {    MyTextField *textF = [[MyTextField alloc] initWithFrame:CGRectMake(100, 100, 200, 40)];- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event@end

 

运行效果:

     UITextFeild的用法


原标题:UITextFeild的用法

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录