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: 575
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: 28740
you forget to add textfield as subview. Use
[self.view addSubView:field];
Upvotes: 3
Reputation: 31730
Add it as subView in your main view. using addSubview:
method of UIView.
Like below.
[self.view addSubview:field];
Upvotes: 1