Ok, I’m learning programming for iOS with Stanford’s online course on iTunes U (CS193P) but I can’t exactly get a hold on how all the stuff from UIView works.
Could someone explain how the following things work cohesively and how I should use them?
CGContextRef
CGContext(if they’re not the same thing)
drawRect
awakeFromNib
Thanks in advance!
is just the reference to
CGContext.makes your view to draw (or redraw) itself at selected rect. Read here.
I never used it by myself, for me it was enough to do all work in
viewWillAppear:andviewDidLoad:.After all outlets and actions are connected, the nib loader sends awakeFromNib to every object in the nib. (c) Read about it here.