11,278 questions
6
votes
0
answers
234
views
Multi-line title in UIButton in a UITableViewHeaderFooterView causes UIViewAlertForUnsatisfiableConstraints warnings
I need to show occasional long texts in a UIButton in the section header of my UITableView. The following simple example code shows the issue:
import UIKit
import SnapKit
class ViewController: ...
-1
votes
0
answers
45
views
Unwanted animations appear on UIButton (iOS 26) [closed]
https://youtube.com/shorts/YXl0ijziTyM?si=RMP2ZQuyFlVsfg8e
After the iOS 26 update, unwanted animations appear on UIButton.
I'm using the attributedTitle property of UIButton.Configuration to change ...
0
votes
2
answers
211
views
iOS 26 prominent button with glass effect results in button image barely visible
I have an iOS 26 app in which I have defined the app wide tintColor to be green:
UIView.appearance().tintColor = UIColor.systemGreen
I have a done button in my navigation bar whose style is ....
1
vote
2
answers
95
views
UIButton menu actions are backwards
Here's a small demo app that configures a button in the interface:
class ViewController: UIViewController {
@IBOutlet var button: UIButton!
override func viewDidLoad() {
super....
0
votes
2
answers
129
views
SwiftUI: How to break button border for a label overlay?
I’m trying to create a button in SwiftUI that has a rounded border and includes an additional label (e.g., “Save 50%”) positioned at the top-left. However, I need the border to “break” where this ...
-1
votes
1
answer
80
views
Storyboard Button: change font size AND round corners
How can we change the font size AND round corners of a button on a storyboard?
Button of style "gray" has a default value of rounded corners.
That is good.
But style "gray" DOES ...
-1
votes
1
answer
141
views
Error when pressing the sound button quickly
I have a volume toggle button. When I press the button, then pause or play is called with some fading. The problem is that if I quickly press the button twice, for example, pause and then playback, I ...
0
votes
1
answer
72
views
How to fix the behavior of the button image depending on the position of the finger?
I have a button and an action. I also have an image for the button in its normal state and when it is pressed. These are .svg images. My button is to turn the sound mute/unmute. So I have two images ...
-1
votes
1
answer
71
views
UIButton setBackgroundImage doesn't work?! Swift UIKit
I have a UIButton in my UIViewController in my storyboard, and I'm trying to change it's background image, using transition animation:
extension UIButton {
func setBackgroundImageWithFade(_ image: ...
0
votes
3
answers
94
views
How can I design a button with two colors and a curved border in CSS?
I am trying to create the button similar to the button shown in image.
Button has 2 colours inside it (like background color). 1 is transparent and other color is light-orange.
The light-orange color ...
0
votes
0
answers
97
views
UIButtonConfiguration not working as expected
I created this button here to be an archive button for an inbox.
class ArchiveButton: UIButton {
// MARK: - Initializer
override init(frame: CGRect) {
super.init(frame: frame)
...
-1
votes
1
answer
152
views
How to scale the title and image of a UIButton to match the size of the button?
I have a UIButton with both a title and an image. The button's size changes dynamically, but the title text and image inside the button do not resize proportionally to match the button's size. I want ...
0
votes
2
answers
181
views
Why is my UIButton not completely tappable (UIKit in Swift)
This is my button:
import UIKit
class PassButton: UIButton {
var videoVC: VideoGameVC?
required init(isEnabled: Bool = false) {
super.init(frame: .zero)
self....
0
votes
1
answer
79
views
Wrong icon size in UIButton created with UIButton.Configuration and .png image
I have created two sets of UIButtons, with regular constructors (top StackVew on the attached image) and with UIButton.Configuration (the bottom StackView).
Both have icons created from a .png file.
...
1
vote
1
answer
61
views
UIStackView wrong distribution if subviews are UIButton created with UIButton.Configuration
The UIStackView doesn't have the correct .fill distribution if subviews are UIButtons created with UIButton.Configuration.
In the example below I created two UIStackView with subviews of UIButton type....