I have made a UIView which contains a table and some buttons. This view is called by a UIViewController which is called by a tab-bar controller. There is no IB involved.
When the view comes up it only has the outlines of the objects. e.g. the following button comes out without its label:
brect = CGRectMake(80, 330, 60, 27);
centern=CGPointMake(CGRectGetMidX(brect), CGRectGetMidY(brect) );
UIButton * button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button2 setFrame:brect];
[button2 setCenter:centern];
[button2 setTitle:@"Delete" forState:UIControlStateNormal];
[button2 addTarget:self action:@selector(deldate:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button2];
As soon as I make the first touch everything appears as it should.
What am I doing wrong?