Hi,
I have tried to programatically create a UIView, and so far it shows up. However, I would like to programatically add a UITextField to this UIView. How can I achieve this? I have tried the following in the initWithFrame function of my custom view, but the UITextField does not show up when I simulate:
Code:
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame])) {
// Initialization code
textField = [[UITextField alloc] initWithFrame:frame];
[self addSubview:textField];
}
return self;
}
Any ideas?