Created
August 10, 2012 15:32
-
-
Save funkyboy/3315063 to your computer and use it in GitHub Desktop.
Tweak padding in UIToolbar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableArray *items = [[NSMutableArray alloc] init]; | |
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; | |
negativeSpacer.width = -10; | |
[items addObject:negativeSpacer]; | |
// add button here | |
// padding will be 10px less than default | |
[self.toolbar setItems:items animated:YES]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment