Questions tagged [rightbarbuttonitem]

The rightmost Bar Button Item in UIToolBar in objective-C

112 questions
0
votes
1 answer

bug in my BarButton

I have a bug in my code and I cannot seem to find it! I've created a button called addButton programatically and set its selector to add—but the app crashes in the simulator every time the button is pressed. Here is my code.…
0
votes
1 answer

UISegmentedControl only shows first item on device but works in Simulator

I have searched around an figured out how to add a UISegmentedControl item to the navigation bar button item (right bar button). It works fine in the simulator but when I try it on the device, only the first item in the segmented control shows up. …
0
votes
0 answers

swift how to divide tableview into sections with add to cart working properly?

This has got me in a crazy-spin. I’ve been ruminating over this for quite some time, have tried every trick of the trade, but with no luck.. I will be greatly indebted if you solve my problem. My issue is that when I divide ProductViewController…
askit
  • 205
  • 4
  • 21
0
votes
1 answer

how do you add left and right bar buttons to UIViewController in swift

Why are my top navbar buttons not showing up in Swift? the following is hoe i have added them and am not sure why they are not showing up when running the code class TermsAndConditionsVC: UIViewController { override func viewDidLoad() { …
Gino Sesia
  • 383
  • 2
  • 4
  • 14
0
votes
1 answer

How can I reset navigation bar items when coming back from popup?

I have a navigation bar with two buttons as the right bar button items and a text field in the title view. If I tap the text field, a search screen pops up and I can enter texts into the text field. The texts in the text field would set the…
0
votes
1 answer

problem to give colors for BarButtonItem

i have a ToolBar in my view controller.i need to show one icon in right side of the ToolBar. so i added a BarButton item and displayed icon image there.but the is a problem with icon color.it displaying as black which is not looking good and also…
Vipin
  • 4,718
  • 12
  • 54
  • 81
0
votes
2 answers

Customizing self.editButtonItem with Check and UnCheck- HELP

So with regards to the rightBarButtonItem . I have self.navigationItem.rightBarButtonItem = self.editButtonItem; When I press Edit, I get animation and a vertical stripe on the left side of each TableViewCell. When I click that stripe, the…
Legolas
  • 12,145
  • 12
  • 79
  • 132
0
votes
2 answers

NavigationItem.rightBarButtonItem is not working

Here is Share Button Initialized: let shareButton = UIBarButtonItem(image: #imageLiteral(resourceName: "ShareButtonCircle"), style: .plain, target: self, action: #selector(shareButtonTapped)) Here is Objc method: print("Share Button Clicked") …
Umer Khan
  • 193
  • 12
0
votes
1 answer

Added custom shadow to navigationBar not removing

I have added the custom shadow layer to navigationBar but not able to remove now. Please guide. Below is the code to add: let offset: CGFloat = (self.navigationController?.view.safeAreaInsets.top ?? 20) shadowView = UIView(frame: CGRect(x: 0, y:…
iPhone 7
  • 1,731
  • 1
  • 27
  • 63
0
votes
1 answer

In iOS11 trying to add a round image as navigationItem in a NavigationBar and it is not clipping its edges

Using iOS13.3, XCode11.3, I try to place a round Image as rightBarButtonItem on my largeTitle NavigationBar. The button is drawn, however it does not get clipped and there are ugly corners in white remaining. Here is my code (see below): As you can…
iKK
  • 6,394
  • 10
  • 58
  • 131
0
votes
1 answer

Limit rows that editbuttonitem affects

In my iPad app I'm using Apple's standard split view template. The master view has a table that's populated by a plist file and my table is split into three grouped sections. In my viewDidLoad method I've added the editbuttonitem that works as…
Selch
  • 131
  • 1
  • 10
0
votes
2 answers

Unable to add barbuttonitem to navigation controller

I would like to integrate both navigation controller and tab bar controller in my project.But I am unable to add right barbutton to the navigation controller. I have attached the screenshot of the storyboard What I have done is I have added…
jerfin
  • 803
  • 1
  • 13
  • 28
0
votes
0 answers

Set Badge on Second to Right Most UIBarButtonItem in Objective-C

When there are notifications, I set a badge on a Notifications Button that is one of three potential Right bar button items. When there are no notifications, the notifications button should and does not show at all. When there are notifications, I…
user1904273
  • 4,562
  • 11
  • 45
  • 96
0
votes
2 answers

How do I put different images in rightBarButtonItem when I click on cell in xcode?

How can I change the image in the right button of the navigation bar when I select a specific cell? A good example is in the picture where the rightBarButtonItem image is different based on the selected cell:
aaallleeexxx918
  • 171
  • 3
  • 11
0
votes
2 answers

Navigationbar right button is not placed correctly

I implemented a UITabBarController with 4 items. I set the initial ViewController from AppDelegate. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { HomeTabBarViewController* homeVC =…