uibarbuttonitem Questions

7

I have a navigation bar to which I have added right BarButton successfully. Both the NavigationBar and BarButton are created programmatically. Now according to my requirement I got to add two right...

18

Solved

I need to customise the look of a back button in a Swift project. Here's what I have: Here's what I want: I've tried creating my own UIBarButtonItem but I can't figure out how to get the image...
Clone asked 31/5, 2016 at 18:15

2

We all know how to make a simple tap on a bar button item present a menu (introduced on iOS 14): let act = UIAction(title: "Howdy") { act in print("Howdy") } let menu = UIMe...
Agnosia asked 25/10, 2021 at 14:56

2

Solved

When pushing from a SwiftUI view to a UIKit, navigation bar items are not present or not added. I have added one item in the storyboard and one item in code, neither show up. This is possibly a bug...

36

Solved

When I push a UIViewController, it has some title in back button at new UIViewController, if the title has a lot of text, It does not look good in iPhone 4s So I want to remove it. If I add some c...
Tetrad asked 28/4, 2015 at 7:3

18

Solved

I have an IBOutlet that I have linked to from the storyboard @IBOutlet var creeLigueBouton: UIBarButtonItem! and I want to make it disappear if a condition is true if(condition == true) { // M...
Stubstad asked 25/8, 2014 at 18:51

2

This might have been answered already but I can't seem to find the answer. iOS 13 introduces the new UIBarButton.SystemItem value of .close. I have played with the new proxy appearance APIs but n...
Vicissitude asked 7/11, 2019 at 20:24

1

I have a toolbar , I'd like to skip the title button when accessibility is turned on. I can skip accessibility for the whole tool bar using accessibilityElementsHidden. but I just want to skip the ...

3

Solved

in iOS 14, there are new APIs for UIMenu, and it can now be attached to UIBarButtonItem, just like that: This is my code: @IBOutlet weak var addButton: UIBarButtonItem! // The button is from the s...
Adele asked 7/8, 2020 at 10:21

31

I am trying to change the color of the Settings button to white, but can't get it to change. I've tried both of these: navigationItem.leftBarButtonItem?.tintColor = UIColor.whiteColor() navigatio...
Joniejonina asked 26/2, 2015 at 3:27

39

Solved

I created a toolbar in IB with several buttons. I would like to be able to hide/show one of the buttons depending on the state of the data in the main window. UIBarButtonItem doesn't have a hidde...
Copenhaver asked 5/4, 2012 at 2:4

1

Please tell me how to customize this menu? Perhaps another way to do it? let barMenu = UIMenu(title: "", children: [ UIAction(title: NSLocalizedString("menu_item_home", commen...
Tasker asked 21/7, 2021 at 20:8

12

Solved

Tried this but only works for UIButton: [btn setTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside];
Succinic asked 25/2, 2010 at 11:36

16

Solved

I am trying to set an Image for bar button Item for that I have an image like: with resolution 30 * 30 but while I assign this Image to Bar button Its looks like: I have assigned image this w...
Bren asked 16/12, 2014 at 7:58

3

Solved

I know that for elements of classes UIButton and UIBarButtonItem they automatically assume window.tintColor as the main colour, which results of an immediate change in case I set a new tintColor to...
Glassco asked 1/10, 2013 at 16:25

2

I am using init(title:image:primaryAction:menu:) of a UIBarButtonItem Apple Documentation on a Toolbar with the hope of showing a button with both image and title. Does anyone know why the title do...
Asquint asked 6/11, 2020 at 13:27

5

Solved

I'm using UIBarButtonItem. In my scenario I want to show a popover from every bar button when I double-click that bar button. So I use a UITapGesture from that UIBarButtonItem. But, the popover arr...

2

Solved

created UIBarButtonItem added Power Image to it. barBtnPower = new UIBarButtonItem (UIImage.FromBundle ("Images/[email protected]") , UIBarButtonItemStyle.Plain , (sender, args) => { }...
Lysander asked 29/9, 2014 at 5:41

6

Solved

I want to display an image in the left hand side of my nav bar in swift. I have tried adding a nav bar button item and setting an image there. The problem is that I have to use a really small ima...
Analogical asked 17/7, 2015 at 10:8

6

Solved

Is there a way to make UIBarButtonItem exclusive touch? At the moment you can select multiple at the same time and it keeps crashing my application.
Meganmeganthropus asked 10/7, 2012 at 9:30

2

I'm creating a UIToolbar with UIBarButtonItem in it programatically. I'm not using .xib or storyboard for this ViewController. Here's the code of how I created it. NSMutableArray *items = [[NSMut...

6

Solved

How can the action for a custom UIBarButtonItem in Swift be set? The following code successfully places the button in the navigation bar: var b = UIBarButtonItem(title: "Continue", style: .Plain,...
Frazil asked 8/7, 2014 at 20:46

8

Solved

I want to create UIBarButtonItems programmatically and place these fixed space items between buttons.
Gunning asked 7/9, 2010 at 21:54

6

Solved

Here is my code. I want to put a back button on the opening rootviewController. - (void)selectSurah:(id)sender { SurahTableViewController * surahTableViewController = [[SurahTableViewController ...
Gainer asked 1/7, 2012 at 15:21

3

Solved

I'd like to indicate that a particular UIBarButtonItem is toggled on or off by changing its background color. Mobile Safari uses this feature to indicate whether private browsing is on or off: ...
Millda asked 13/10, 2014 at 21:12

© 2022 - 2024 — McMap. All rights reserved.