标签:
UIBarButtonItem *itemTransformView = [[UIBarButtonItem alloc] initWithCustomView:_header.transformView];
// 调整 leftBarButtonItem 在 iOS7 下面的位置
if(([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0)){
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
target:nil action:nil];
negativeSpacer.width = -12;
self.navigationItem.rightBarButtonItems = @[negativeSpacer, itemTransformView];
}else{
self.navigationItem.rightBarButtonItem = itemTransformView;
}
标签:
原文地址:http://www.cnblogs.com/z-j-w/p/4764047.html