Я добавил текстовое поле в viewDidLoad, но оно не отображалось на экране.
Вот. Ч
#import <UIKit/UIKit.h>
@interface SecondViewController : UIViewController{
UITextField *tfText;
}
@property (nonatomic, retain) UITextField *tfText;
@end
Вот. М
- (void)viewDidLoad{
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor lightGrayColor]];
tfText.frame = CGRectMake(65, 100, 200, 50);
tfText.backgroundColor = [UIColor whiteColor];
[tfText setTextColor:[UIColor blackColor]];
tfText.placeholder = @"Test";
[tfText setBorderStyle:UITextBorderStyleNone];
[self.view addSubview:tfText];
}