All Questions
3,402
questions
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: ....
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 ...
-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 ...
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 ...
-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, ...
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....
-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 ...
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....
-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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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 ...