Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [viewController.navigationItem.rightBarButtonItem setBackgroundVerticalPositionAdjustment:50 forBarMetrics:UIBarMetricsDefault];
- UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
- [btn setBackgroundImage:[UIImage imageNamed:@"chk_back.png"] forState:UIControlStateNormal];
- [btn addTarget:self action:@selector(BackBtn) forControlEvents:UIControlEventTouchUpInside];
- UIView *customView = [[[UIView alloc] initWithFrame:CGRectMake(0,0, 50, 38)] autorelease];
- btn.frame = CGRectMake(10, 3, 30, 32); // where you can set your insets
- [customView addSubview:btn];
- UIBarButtonItem *barBtn = [[UIBarButtonItem alloc] initWithCustomView:customView];
- UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc]
- initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
- target:nil
- action:nil];
- [fixedSpace setWidth:20];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement