Did you set a width constraint for the button ?
That would explain that text is trimmed when bold (because it is larger font).
You could also increase the text label width in IB.
I just set center X and Y constraint. because i thought intrinsic content size will resize the button.
I did test such setting "Bold Text" (under iOS Settings, General, Accessibility).
- if width is constrained, or if there is no centerX constraint, I get the trimming
- but without width constraint and with centerX, the button expands correctly
I tested this with both:
- a basic button
- a button with image defined (selected square arrow up image in background image, gave it a title "Button with long title") and reset the button as system button.
=> is this the type of button with image you mean ?
Same behavior for both. It does not trim text.
XCode 11.2. iOS 13.2. With storyboard, not SwiftUI.
I tested with:
- create a XCode project (XCode 10.3 and XCode 11.2, iOS 11.4 and iOS 13.0) and using storyboard
- add a basic button
- set type custom to the button
- set text color to red
- set text to show!
- set an image to the button
- set constraints center X and Y (didn't set width constraint)
I attached a link which is a screenshot I tested.
if I didn't set an image to the button, it works.
so I thought it's a bug or I'm missing something.
I repeated your set up with XCode 11.2 beta2.
Except I could not find the IC_Filter image, so I used other, such as link.
No problem at all.
When I change the accessibility setting and return to the app, the button text shows full.
In fact, it works also without centerX.
Where did you get this image from ? I see it is green.
Did you try with another image, just to test (eg, link image).
Could you show the screen of the button constraints ?
my colleague made images. but I think the images have no problem.
and yes, I tried with another images, but the issue is not gone.
if you don't get the issue, I think there's something different your settings or test simulation with me.
so I left a link to check all my asset images and simulation video.
and thank you for your reply.