iOS13 UITextField 设置leftView大小不生效不响应

_account = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, inputW, inputH)];

_account.center = CGPointMake(SDKWindowW/2, self.logoView.frame.origin.y + self.logoView.frame.size.height);
[_account setBackground:[UIImage imageNamed:XHIMG_INPUTBG]];
UIView *accountView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, inputH, inputH)];
UIImageView *accountLView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:XHIMG_ICON_PHONE]];
accountLView.frame = CGRectMake(0, 0, inputH, inputH);
[accountView addSubview:accountLView];
_account.leftView = accountView;
_account.leftViewMode = UITextFieldViewModeAlways;
_account.placeholder = @"请输入手机号";
_account.autocapitalizationType = UITextAutocapitalizationTypeNone;
_account.font = fontNormal;
_account.delegate = self;
[self.view addSubview:_account];

你可能感兴趣的:(iOS13 UITextField 设置leftView大小不生效不响应)