Reputation: 41
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
Upvotes: 0
Views: 574
Reputation: 980
i think you should try this too
first give constrain to text field as below
and now simply increase the height of text filed
and if you don't want constrain then remove it
i hope it will help you
Upvotes: 0
Reputation: 28720
you forget to add textfield as subview. Use
[self.view addSubView:field];
Upvotes: 3
Reputation: 31722
Add it as subView in your main view. using addSubview:
method of UIView.
Like below.
[self.view addSubview:field];
Upvotes: 1