Adding multiple buttons on the right side of a UINavigationbar (iOS)

Adding multiple buttons on the right side of a UINavigationbar (iOS)

why not try this out buy dapoxetine online Adding multiple buttons on the right side of a UINavigationbar could improve the UI with some ‘always to reach buttons’.


[cc lang=”objc” escaped=”true” width=”90%” theme=”default” line_numbers=”on”]
UIImage* image1 = [UIImage imageNamed:@”star.png”];
CGRect frameimg = CGRectMake(0, 0, image3.size.width, image1.size.height);
UIButton *someButton = [[UIButton alloc] initWithFrame:frameimg];
[someButton setBackgroundImage:image1 forState:UIControlStateNormal];
[someButton addTarget:self action:@selector(AddFavorite)
forControlEvents:UIControlEventTouchUpInside];
[someButton setShowsTouchWhenHighlighted:YES];

UIBarButtonItem *buttonOne =[[UIBarButtonItem alloc] initWithCustomView:someButton];
UIBarButtonItem *buttonTwo =[[UIBarButtonItem alloc] initWithCustomView:someButton];

self.navigationItem.rightBarButtonItems = @[buttonOne, /* fixedSpaceBarButtonItem, */ buttonTwo];