Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
2 answers
91 views

How to disable title color change when highlighted state for UIButton using UIButtonConfiguration is active?

This is how my UIButton is defined and initialized: lazy var addButton: UIButton = { let button = UIButton(radius: 32, title: "+", font: .poppinsRegular.withSize(40), backgroundColor: ....
Bartłomiej Semańczyk's user avatar
0 votes
0 answers
30 views

UIbutton - title label not align centre. iOS 17 Swift

I have a UIButton created in XIB and linked to my uiViewController. Its title label not align to centre. It's always align to left. When app running from Xcode , its correctly align centre. When App ...
Sujisha Os's user avatar
  • 1,351
-1 votes
1 answer
42 views

Why isn't my @IBAction function for my UIButton being registered by the program?

I am creating a survey as a part of the app that I'm building. It should be so that if one of the multiple choice options is selected and the Next button is tapped, then the data from that answer is ...
mariaj's user avatar
  • 1
0 votes
1 answer
55 views

UIButton with configuration gives incorrect intrinsic content size, when not connected to debugger

We create a UIButton by initialising it with a configuration and embedding it within a (horizontal) UIStackView. We set setContentHuggingPriority to required because we want the button to only take up ...
Birgit Van Keer's user avatar
-1 votes
1 answer
42 views

Button click not working when adding subview to window in swift

I am trying to do a toast notification by adding a view to the window and it has a progress bar and a button to click if it wants to dismiss before the time expires. The button click is not working, ...
Lucca Germano's user avatar
0 votes
1 answer
41 views

How to solve constraints issue: Position is ambiguous for UIButton?

I have placed UIButton to right view of textfield. But I see the below warning My code for UIButton: private lazy var myButton : UIButton = { let button = UIButton() var config = UIButton....
AppleDeveloper's user avatar
-1 votes
1 answer
42 views

How to make UIButton width same as text width on its label?

I am trying to set my button width equal to text length. But width of my button is not changing. My button is inside a vertical stack view. Stack view has two views. Text is the button title label. My ...
AppleDeveloper's user avatar
0 votes
1 answer
51 views

Can we add a button inside Textfield in Storyboard based UIKit application?

I created a textfield and button in storyboard inside a stack view.I want my button to be inside textfield. For this inside code I have written : textField.rightView = button textField....
AppleDeveloper's user avatar
-1 votes
4 answers
69 views

How to disable UIButton getting highlighted when clicked?

I tried multiple solutions from stack overflow but no luck. I have set HighlightedAdjustsImage = false In my Code : button.backgroundColor = .clear button.layer.borderWidth = 0 inside my IBAction for ...
AppleDeveloper's user avatar
0 votes
1 answer
88 views

UIbutton not responding consistently to touch event

I placed my UI button inside stack view of storyboard in UIKit App. and I enabled user interaction to both stack view and button. My button width and height are 20,20. I am using this UIbutton for ...
AppleDeveloper's user avatar
1 vote
2 answers
119 views

How to underline title with UIButton.Configuration?

This is my convenience init for UIButton: convenience init(underlinedTitle: String, font: UIFont, color: UIColor) { var configuration = UIButton.Configuration.plain() configuration.title = ...
Bartłomiej Semańczyk's user avatar
0 votes
0 answers
22 views

Vibration problem when rotating ImageView in UIButton - iOS

Comparison with the first function call I created a UIButton with text and images that fetched the calendar. And I'm rotating the imageView 90 degrees with the button action. However, as you can see ...
이경은's user avatar
0 votes
1 answer
48 views

Subview on UIButton always appears behind the label and image

I have a label which is supposed to be a badge for unread notifications count, but since refactoring to use UIButton.Configuration the label always gets rendered behind the button label and image, no ...
vajzs16's user avatar
  • 20
0 votes
2 answers
328 views

How to apply a .symbolEffect (ie, the animation such as pulse) to an SF system image to a UIButton in UIKit?

Is it possible to apply a .symbolEffect (ie, the animation such as pulse) to an SF system image to a UIButton in UIKit, ie not a SwiftUI app or insert ? (Pls note that there are a 100 questions ...
Fattie's user avatar
  • 13.9k
0 votes
1 answer
105 views

Set Size for UIButton with new iOS15 Configuration Approach

My goal is to add button to the right hand side of a section header in a UITableView. However, when I made my new target iOS15, I found that I had to adopt UIButton configuration to set the padding to ...
Dave's user avatar
  • 12.2k

15 30 50 per page
1
2 3 4 5
227