• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spacing buttons in UIToolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spacing buttons in UIToolbar


  • Subject: Re: Spacing buttons in UIToolbar
  • From: WT <email@hidden>
  • Date: Wed, 29 Jul 2009 01:11:42 +0200

On Jul 29, 2009, at 12:48 AM, DKJ wrote:

I'm using the setToolbarItems:animated: of a UITableViewController to place buttons on the toolbar. If I was using IB, I could space the buttons evenly simply by inserting some flexible-space ones between them. Is there an easy way to do this in code? Or do I need to calculate widths for some blank buttons and insert them into the toolbar items array?

dkj

As almost always, the answer lies in the documentation. Take a look at the UIBarButtonItem method


- (id) initWithBarButtonSystemItem: (UIBarButtonSystemItem) systemItem
                            target: (id)
                      targetaction: (SEL) action

and use the appropriate choice from the enumeration UIBarButtonSystemItem.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Spacing buttons in UIToolbar (From: DKJ <email@hidden>)

  • Prev by Date: Re: Copying Managed Objects from App to Doc MOContext
  • Next by Date: Fun (or not) with NSArrayControllers and CoreData.
  • Previous by thread: Spacing buttons in UIToolbar
  • Next by thread: Override Font Tool and Colors Tool
  • Index(es):
    • Date
    • Thread