Note that there are some explanatory texts on larger screens.

plurals
  1. POUIBarbuttonItem has no title on ios 7
    primarykey
    data
    text
    <p>I have an app, which I am migrating to iOS 7. However, the <code>UIBarbuttonItem</code>s have no title, but are working normally. Here is my code : </p> <pre><code>UIBarButtonItem * uibbShare = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"sharewhite.png"] style:UIBarButtonItemStylePlain target:self action:@selector(sharePressed:)] autorelease]; // uibbShare.width = 56.0; // uncommenting this doesn't change anything uibbShare.title = @"Share"; </code></pre> <p>Then I add some of these to the toolbar with some flexible space items between.</p> <pre><code>... [items addObject:flex2]; [items addObject:uibbShare]; ... </code></pre> <p><code>[self.toolbar setItems:items animated:NO];</code></p> <p>On iOS 7 they have no title at all, on iOS6 all is working fine. Can't you create barbuttons like this in ios7 anymore ? </p> <p><strong>Update</strong> Same problem on Dev Forums : </p> <p><a href="https://devforums.apple.com/message/872899#872899" rel="nofollow noreferrer" title="Dev Forum link 1">UIBarButtonItem can't have both title and image?</a></p> <p><a href="https://devforums.apple.com/message/867947#867947" rel="nofollow noreferrer">What happened to the text under toolbar icons?</a></p> <p><strong>Edit</strong> : ( 7 vs 6 )</p> <p><img src="https://i.stack.imgur.com/4W0DT.png" alt="enter image description here"></p> <p><strong>Edit 2</strong> : ( a picture from Reveal, it seems the text is gone, and the frame/bounds are 0. wtf )</p> <p><img src="https://i.stack.imgur.com/BsBWb.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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