Created
December 1, 2016 16:39
-
-
Save monsoir/0620cdc9a0235dd09512b24b7c59e507 to your computer and use it in GitHub Desktop.
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
if(([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0?20:0)){ | |
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil]; | |
negativeSpacer.width = -10;//这个数值可以根据情况自由变化 | |
self.navigationItem.rightBarButtonItems = @[negativeSpacer,itemAdd, itemSearch]; | |
} else { | |
self.navigationItem.rightBarButtonItems = @[itemAdd, itemSearch]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment