Take a look at the iPhone Droplr app:

Please note that UIBarButtonItem can touch the right, left, top and bottom of the screen / navigation bar?
How can I achieve something like this? This is how I make a UIBarButton sample and set it to the right element:
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setImage:image forState:UIControlStateNormal]; button.frame= CGRectMake(0.0, 0.0, image.size.width, image.size.height); [button addTarget:self action:action forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *bb = [[[UIBarButtonItem alloc] initWithCustomView:button]autorelease]; [self.navigationItem setRightBarButtonItem:bb animated:YES];
However, it does not align to the right and has quite a bit of difference above and below. My image size is correct (44px) and it looks like it is compressing it to fit the frame.
So how can I do this?
Edit: Oops, the upper / lower interval was my mistake. However, I cannot figure out how to align the panel button with the left / right side. Here is what I mean: (sorry for the ugly button, it was just a test)

I tried to set the image inserts, but it didn't seem to do anything.
iphone cocoa-touch uinavigationbar uibarbuttonitem
sudo rm -rf
source share