开发者

Increasing height of UITextField?

I tried this:

UITextField *field = [[UITextField alloc] initWithFrame:CGRectMake(164, 282, 461, 60)];
[txt setBorderStyle:UITextBorderStyleRoundedRect];

But when I build I cannot see the UITextField, help please. I also tried, field = CGSizeMake but you cannot assign CGSizeMake to a 开发者_如何学编程UITextField


you forget to add textfield as subview. Use

[self.view addSubView:field];


Add it as subView in your main view. using addSubview: method of UIView.

Like below.

[self.view addSubview:field];


i think you should try this too

first give constrain to text field as below

Increasing height of UITextField?

and now simply increase the height of text filed

Increasing height of UITextField?

and if you don't want constrain then remove it

Increasing height of UITextField?

i hope it will help you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜