What´s the diffrence between UIView and .xib files?

Discussion in 'iOS Programming' started by alexandergre, Jul 28, 2009.

  1. alexandergre macrumors member

    alexandergre

    Joined:
    Jul 28, 2009
    #1
    xib file must have .h .m classes.


    but I really dont know when to use UIview or xib files? what is the diffrence betweenn them?
     
  2. Fontano macrumors member

    Joined:
    Jun 27, 2008
    #2
    They are not really comparable.

    UIView is the programming object, that contains all the methods and properties the application communicates with display a view.

    An XIB is a graphic representation and holder file, that contains the definition for the graphical look of the application (in one context).

    An XIB really can't exist without a UIView to communicate with it.
    A UIView can exist without an XIB as all the objects can be done via code.

    This is an extremely simplistic comparison to answer your question.
    I am sure others will pipe in with more information.
     

Share This Page