Domanda

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!

È stato utile?

Soluzione

CGContextRef 

is just the reference to

CGContext.

drawRect 

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: and viewDidLoad:.

After all outlets and actions are connected, the nib loader sends awakeFromNib to every object in the nib. (c) Read about it here.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top