ShineUpdater icon indicating copy to clipboard operation
ShineUpdater copied to clipboard

Text Align

Open aled2305 opened this issue 4 years ago • 2 comments

Hi. I seem to have everything working, but the alert title is aligned to the left. Is there a way of centring this? 104437079_214244046272448_8050129404133207551_n

Thanks

aled2305 avatar Jun 19 '20 17:06 aled2305

Hm, bummer. We wanted to left-justify the main message label but keep the title centered, otherwise release notes look weird especially when they are bullet lists.

https://github.com/EightyThreeCreative/ShineUpdater/blob/master/Shine/Shine.swift#L354

You can see there where we used a hack to get the labels from the UIAlertController and it seems they changed the order of the subviews. We should probably come up with a better solution for this in general, though I'm hesitant to include UI that's heavier than an alert. Thoughts?

Vortec4800 avatar Jun 19 '20 17:06 Vortec4800

In that same Stack Overflow question from the source, there is another method of left justifying the message by using an attributed string with a paragraph style. This is probably a better method than mucking about in the view hierarchy.

Vortec4800 avatar Jun 19 '20 17:06 Vortec4800