the difference between mac and iphone - loading process

Discussion in 'Mac Programming' started by Howiieque, Jan 12, 2010.

  1. Howiieque macrumors regular

    Joined:
    Feb 1, 2009
    #1
    hi everyone.
    both UIView and NSView conform to the NSCoding Protocol.

    i subclass both of them and make a instance in the IB respectively in two projects.

    mac:
    1. initWithFrame: was invoked
    2. awakeFormNib: was invoked
    (initWithCoder: was NOT)

    iphone:
    1. initWithCoder: was invoked
    2. awakeFromNib: was invoked
    (initWithFrame: was NOT)

    i think the iphone loading process makes sense. since the view is stored in the nib file, when it get unarchived, initWithCoder: is get caller.
    could someone explain the difference.
    thank you in advance.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
  3. Howiieque thread starter macrumors regular

    Joined:
    Feb 1, 2009
    #3
    thank you very much. especially the recommendation of The Object Loading Process section. things are so much clear now. :D
     

Share This Page