ios - I do not get any indication that the appropriate method has fired (I have a NSLog in drawRect) -


in storyboard, have view controller custom view controller class - bulbviewcontroller. has sub-view, have implemented dragging in view on storyboard. need view object can use drawrect method.

i have dragged outlet storyboard bulbviewcontroller.h file such:

@property (strong, nonatomic) iboutlet bulbview *thebulbview; 

however, if try reference in .m file, doing:

@synthesize thebulbview;  ...  - (void) viewdidload {     [thebulbview setneedsdisplay]; } 

i not indication appropriate method has fired (i have nslog in drawrect). i'm not quite sure why is. reading on issue, seems may have child views? perhaps in bulbviewcontroller.m:

[self.view addsubview:thebulbview]; 

however i'm not quite sure go there. , appreciated!

make sure view dragged out in storyboard instance of custom uiview subclass wrote. select view, go identity inspector , make sure type in name of uiview subclass (eg. bulbview)


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -