custom uiview inside a uiview controller does not show ios -
i have uiview controller , uiview called gcview.
if code :
self.view = [[gcview alloc] init];
i can see custom view.
when drag , drop uiview in storyboard, assign property called customview
and use code:
self.customview = [[gcview alloc] init];
nothing shown.
i want use second approach, because more convenient have stuff inside uiview created , handled dynamically, , others statically inside storyboard , handled in uiviewcontroller.
make sure view object in story board of class gcview. call initwithcoder: in gcview class when view loads. once have that, remove this:
self.customview = [[gcview alloc] init];
as object have been initialized storyboard loading. make sure of initialization calls in gcview class in initwithcoder: , not init.
Comments
Post a Comment