EightyThreeCreative / ShineUpdater

An Enterprise app update framework for iOS
MIT License
299 stars 12 forks source link

Text Align #11

Open aled2305 opened 4 years ago

aled2305 commented 4 years ago

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

Vortec4800 commented 4 years ago

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 commented 4 years ago

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.