1

So here's a weird one. I've been doing a combination of interface builder and some direct editing of the .xib file and somewhere along the line I managed to produce a button (UIBarButtonItem) on the Toolbar that actually has a label BENEATH the button.

Which I quite like, if only I knew how to get it consistently. Is this a standard thing that can be done with Interface Builder via some obscure methodology? Or is there a well-defined way to do it just by editing the .xib file?

Note too that the toolbar here has also been made taller than normal by editing the .xib file. Is that something that Apple would reject an app for because it doesn't conform to UI style guidelines?


Oh, realized that it might be useful to stick in a snippet of code from the .xib file, so here's the (hopefully pertinent) portion:

                    <object class="IBUIToolbar" id="906120387">
                    <reference key="NSNextResponder" ref="380026005"/>
                    <int key="NSvFlags">1290</int>
                    <string key="NSFrame">{{0, 426}, {320, 54}}</string>
                    <reference key="NSSuperview" ref="380026005"/>
                    <bool key="IBUIOpaque">NO</bool>
                    <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
                    <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
                    <object class="NSMutableArray" key="IBUIItems">
                        <bool key="EncodedWithXMLCoder">YES</bool>
                        <object class="IBUIBarButtonItem" id="594926440">
                            <string key="IBUITitle">belowbutton</string>
                            <object class="NSCustomResource" key="IBUIImage">
                                <string key="NSClassName">NSImage</string>
                                <string key="NSResourceName">gear_button.png</string>
                            </object>
                            <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
                            <float key="IBUIWidth">69</float>
                            <int key="IBUIStyle">1</int>
                            <reference key="IBUIToolbar" ref="906120387"/>
                        </object>
                    </object>
                    <object class="NSColor" key="IBUITintColor">
                        <int key="NSColorSpace">3</int>
                        <bytes key="NSWhite">MAA</bytes>
                    </object>
                </object>
Zoe
  • 27,060
  • 21
  • 118
  • 148
Ron Headshot
  • 71
  • 2
  • 6

1 Answers1

0

You really aren't supposed to edit IB files directly.

I don't think Apple will reject an app because of it, since many apps play games by introducing views inside of other views and otherwise playing with the structure of normal components. The thing I'd worry about would by that IB might be confused by some changes.

I'm not sure how you go the label effect to take place, but it might be hard to reproduce.

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
  • But isn't IB just a front-end text/code generator? I can understand that at some point you can produce a file that IB might not understand anymore but IB parsing isn't necessary for a clean compile, yes? – Ron Headshot Jul 02 '11 at 19:21
  • IB parsing is most certainly necessary for a CORRECT compile! It has to transcode that into an internal form the nib loader can use, then on top of that the nib loader has to be able to understand what it is trying to load in order to instantiate the objects. Like I said, I think what you are doing will probably work but I'm just letting you know you are playing with fire here. Most people who do that customization do it through code... – Kendall Helmstetter Gelner Jul 03 '11 at 02:27