All Questions
Tagged with objective-c uibutton
3,463
questions
0
votes
0
answers
33
views
UIButton visible but cannot be pressed
My buttons can’t be pressed. When I press them there is no animation or highlight, and the onPressed method never gets called either.
I strongly suspect there’s something wrong with the way I’m adding ...
-1
votes
1
answer
300
views
iOS Button background image not working. (UIButton backgroundImage) [duplicate]
(A) Following line change the image in my imageview.
[(UIImageView *)[cell viewWithTag:400] setImage:[UIImage imageNamed:@"sellsign"]];
(B) Following code change only Title of button. [ I ...
1
vote
1
answer
387
views
UIButton width or line break mode problem
I'm programmatically adding UIButton objects to an UIScrollView. The result I'm getting is that the height of the button is calculated properly, i.e. there is a space for a second line, but the text ...
0
votes
1
answer
1k
views
UIButton title text color change
I have a UIButton in a custom UIView. In the view, I have a function setDisabled:(BOOL)disabled which is called when I want to change the appearance of the UIView.
\\ Method 1
- (void) setDisabled:(...
1
vote
3
answers
4k
views
IOS 15 UIButton right alignment not working
In IOS 15, Even after setting button text alignment to right, it leaves little space after the button title text.
As shown in the following image it leaves the space after the word Test.
How can I ...
0
votes
1
answer
1k
views
Example for using iOS 15's new ConfigurationUpdateHandler for a UIButton in Objective-C
I want to try out the new UIButtonConfigurationUpdateHandler that's available in iOS 15 to create a toggle button. There are lots of very nice examples using Swift (like this one by Sarunw, but most ...
0
votes
0
answers
55
views
UIButton is not displaying below the TableView
I have a view-controller, to which I add a tableView, and a “Done” Button.
I’m able to add the tableview to my view controller successfully, but my “Done” button does not display.
The tableview is ...
0
votes
1
answer
320
views
By setting text to UIButton resets button font to default
In my code, I have created a custom button (i.e subclass of UIButton), But I am unable to set the font to the button. Have observed that, If I am using self.titleLabel?.text = title it works fine but ...
0
votes
1
answer
632
views
UIButton in a custom UIView is not being triggered when tapped upon
I've placed a UIButton inside a custom UIView, CustomButtonView. The UIButton is not responding to tap/click events, and its appropriate selector method is not being triggered. Here's my code below; ...
-1
votes
2
answers
2k
views
How to set UIBackgroundConfiguration for UIButton?
I am struggling to change background properties of UIButton.
They can be easily modified using "Background Configuration" settings in Interface Builder:
but I don't understand how to set ...
0
votes
1
answer
264
views
Clicking UIButton after Disabling its user interaction causes collection view cell being selected
I have a collection view cell and a button as its subview. If you click the cell it goes to the detail page. And if you click the button it adds the item to the basket. I need to block the button from ...
0
votes
1
answer
834
views
Swift selector method not being called
I create an action class to store the selectors, then addTarget to the button, but when I click it, the method in the action class has not been called
class ItemCardAction {
static var shared:...
0
votes
1
answer
64
views
uibutton image not shown in simulator
I a trying to do an uibutton with image and text, in xib it looks fine but in the simulator the image is missing, and I don't know why.
xib:
the uibutton settings:
the look in simulator:
1
vote
2
answers
231
views
How to make multiple radioButtons but only one is always selected where the first is default?
I work an Objective-C project and trying to build a multiple radio buttons. Shortly I want to make multiple radioButtons but only one is always selected where the first is default.
I started to try ...
0
votes
0
answers
18
views
Adding UIViewController's .view to UITableViewCell makes its button to not receive touches
I have a tableview that has 3 rows (1st ads, 2nd content, 3rd content description)
Inside my tableViewCell for the content:
-(void)setupCell{
MyViewController* vc = [[MyViewController alloc] ...