i got the following code:
- (id)init {
if (self = [super init]) {
self.title = @"please wait";
UIBarButtonItem *favorite = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"star.png"] style:UIBarButtonItemStylePlain target:self action:@selector(buttonFavoriteClicked:)];
self.navigationItem.rightBarButtonItem = favorite;
}
return self;
}
but my button looks still like a Button with UIBarButtonItemStyleBordered alt text http://img693.imageshack.us/img693/1632/bildschirmfoto20100227ui.png
is there a way to set a button with plain style at this position?
Why not try UI7Kit? Works well for me, easy to use.
Try this instead:
Hope it helps.
It's weird but it works. Say "No" to images/outlets! You shouldn't even set the UIBarButtonItemStylePlain property. The trick is to place button into UIToolBar with some special attributes:
Create a UIButton in interface builder, make it look like exactly what you want. Create an outlet for in in your .h:
Then set it as your right bar button item using a custom view, which will eliminate the border:
This works because UIButton is a subclass of UIView.
Try this,