-1

How may I puy into a UIToolbarButton a custom picture characters (like the bookmark one) followed by some text ?

Steve
  • 1,553
  • 2
  • 20
  • 29
Oliver
  • 23,072
  • 33
  • 138
  • 230
  • May be this question might help you http://stackoverflow.com/questions/4644606/how-to-display-a-title-and-image-on-uitoolbar-simultaneously – Robin Jun 09 '11 at 05:17

2 Answers2

2

Create a UIView and drop a UIImage and UITextView (or UILabel) on the view. Then add the view to the toolbarbutton.

PengOne
  • 48,188
  • 17
  • 130
  • 149
0

To have an image and text for your toolbar button ( I think that's your question) I create a tabBarItem property and alloc init it in a "setup" method. In awakeFromNib I call the "setup" method. Be sure to have your image that you use in your supporting files folder This is how I do it:

@interface YourViewController : UIViewController {

}
@property (retain) UITabBarItem *tabBarItem;
-(void)setup;
@end

@implementation YourViewController
@synthesize tabBarItem;

-(void) setup{
UITabBarItem *item = [[UITabBarItem alloc] initWithTitle:@"theTitleYouWant" image:[UIImage imageNamed:@"yourImage.png"] tag:0];
self.tabBarItem = item;
[item release];
}
@end
brandonbocklund
  • 595
  • 4
  • 11