uialertviewcontroller presented reset's my tableview cells, font size / attributed text (iOS18)

when presenting an uialertviewcontroller either an actionsheet or alert it seems to have some weird interaction with my tableview cells. For example, i have custom font sizes a user can set so when im loading my cell i set the font size. It looks good on load but the second i preset a uialertviewcontroller it 'reset's all the cells to the default interface builder set fontsize. Some cells i use attributed text programmatically and that all gets reset as well to 'default' interface builder label settings. Its very odd.

this is in iOS 18 b1. Funny enough it seems like every beta 1 (if i recall maybe in iOS 17 or iOS 16) it did the same thing there attributed text would like 'reset' its very odd.

I have a hunch this is a bug and filed a feedback, but curious if there are any workarounds, or simply just wait until its fixed :D . Thanks all !

Answered by Frameworks Engineer in 790119022

What is your feedback number?

One thing that you may be hitting is having a bad implementation of traitCollectionDidChanged: in your code. Since the changes to the trait system in iOS 17 it is now much more common for system components to use custom traits to signal information, and if applications haven't migrated to the new trait APIs, or are doing work without checking if the traits they are interested in have changed in traitCollectionDidChanged:, then bad behavior can be the result.

What is your feedback number?

One thing that you may be hitting is having a bad implementation of traitCollectionDidChanged: in your code. Since the changes to the trait system in iOS 17 it is now much more common for system components to use custom traits to signal information, and if applications haven't migrated to the new trait APIs, or are doing work without checking if the traits they are interested in have changed in traitCollectionDidChanged:, then bad behavior can be the result.

FB13826208 (see comment - sorry not sure with new forums if you are notified on comment vs reply)

for any of the framework engineers who might be looking at forums / feedback number, I've added a little more info to the feedback number above. Ive seemed to have narrow it down to the one reason its happening, as to 'why' its happening, that ill have to ask your thoughts :D Thanks!

uialertviewcontroller presented reset's my tableview cells, font size / attributed text (iOS18)
 
 
Q