Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One way to load your component is to store your components into a top <code>UIView</code> object (s. attached screenshot).</p> <p><a href="http://a1.img.mobypicture.com/fd182b5ba5c55fa1fba9162f395ddb98_full.jpg" rel="nofollow noreferrer">http://a1.img.mobypicture.com/fd182b5ba5c55fa1fba9162f395ddb98_full.jpg</a></p> <p>You can then load your nib as usual and use <code>-addSubview:</code> to add your components to the view hierarchy.</p> <p>EDIT:</p> <p>Loading the nib with</p> <pre><code>UIView *view = [[[NSBundle mainBundle] loadNibNamed:@"testView" owner:self options:nil] objectAtIndex:0]; </code></pre> <p>and adding the view to the view hierarchy with</p> <pre><code>[self.view addSubview:view]; </code></pre> <p>leads to the following view hiearchy:</p> <pre><code>(lldb) po [[self view] recursiveDescription] (id) $1 = 0x088487b0 &lt;UIView: 0x89595b0; frame = (0 0; 320 548); autoresize = W+H; layer = &lt;CALayer: 0x8958b30&gt;&gt; | &lt;UIView: 0x89755c0; frame = (0 0; 320 200); autoresize = RM+BM; layer = &lt;CALayer: 0x8975080&gt;&gt; | | &lt;UIView: 0x8975620; frame = (200 20; 100 30); autoresize = W+H; layer = &lt;CALayer: 0x8975680&gt;&gt; | | &lt;UIView: 0x8975700; frame = (20 20; 100 30); autoresize = W+H; layer = &lt;CALayer: 0x8974ea0&gt;&gt; | | &lt;UIRoundedRectButton: 0x8975790; frame = (20 58; 73 44); opaque = NO; autoresize = RM+BM; layer = &lt;CALayer: 0x8975890&gt;&gt; | | | &lt;UIGroupTableViewCellBackground: 0x8976030; frame = (0 0; 73 44); userInteractionEnabled = NO; layer = &lt;CALayer: 0x8976100&gt;&gt; | | | &lt;UIImageView: 0x89768d0; frame = (1 1; 71 43); opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x89770f0&gt;&gt; | | | &lt;UIButtonLabel: 0x8977af0; frame = (36 22; 0 0); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x8977be0&gt;&gt; | | &lt;UIRoundedRectButton: 0x8978990; frame = (227 58; 73 44); opaque = NO; autoresize = RM+BM; layer = &lt;CALayer: 0x8978a60&gt;&gt; | | | &lt;UIGroupTableViewCellBackground: 0x8978a90; frame = (0 0; 73 44); userInteractionEnabled = NO; layer = &lt;CALayer: 0x8978b10&gt;&gt; | | | &lt;UIImageView: 0x8978b80; frame = (1 1; 71 43); opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x8979230&gt;&gt; | | | &lt;UIButtonLabel: 0x8978be0; frame = (36 22; 0 0); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x8978cd0&gt;&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload