Simple addView problem
Posted
by
Buyin Brian
on Stack Overflow
See other posts from Stack Overflow
or by Buyin Brian
Published on 2011-01-14T16:08:31Z
Indexed on
2011/01/14
19:54 UTC
Read the original article
Hit count: 191
objective-c
Hi there.
I have a simple addView problem that is driving me nuts, I know I am overlooking something simple, perhaps another set of eyes can help.
I have a Nib with a view that has a class identity set to TestView
In my view controller, I use the following code:
CGRect myRect = CGRectMake(0, 0, 320,240);
TestView *myTest = [[TestView alloc] initWithFrame:myRect];
[self.view addSubview:myTest];
I have a NSLog in the TestView class's initWithFrame that fires when the above code is executed, but the view doesn't appear in the view controllers view.
Thanks for your help.
© Stack Overflow or respective owner