-2

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!

James Traimory
  • 513
  • 1
  • 4
  • 8
  • 1
    This isn't really a good question for SO. Please read the FAQ. You're asking for a general explanation of four different concepts. SO questions should be about single, specific problems. – jrturton Jul 01 '12 at 08:53

1 Answers1

1
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.

Pavel Oganesyan
  • 6,774
  • 4
  • 46
  • 84