Search code examples
iosuiaccessibilitydynamic-type-feature

Toast popup for dynamic type


I've noticed that when you turn on dynamic type, there are apps such as Settings that will display a toast message with the text of certain controls when you hold a finger on the control. Does anyone know if this is built in functionality or do I have to build my own version? If it is built in, how do I turn it on?

Thanks,

enter image description here


Solution

  • Does anyone know if this is built in functionality or do I have to build my own version?

    Exactly like Dynamic Type, some graphical items have a scalable size thanks to accessibility settings but only since iOS11: a very interesting built-in feature called the Large Content Viewer.

    If it is built in, how do I turn it on?

    Some steps have to be followed in Xcode to reach your goal (image with a pdf extension, resizing, scales, adjusts image Size...): check out the provided link to get a complete example.

    If you need further explanation:

    • This WWDC detailed summary dives deeper into explanations for the Dynamic Type feature implementation (see the example section on the web page of the link).
    • This WWDC detailed summary introduces the Large Content Viewer feature that can be adapted to custom views since iOS 13.