{ SwiftUI }

  • Why State update doesn't work

    | /

    Recently, some personal apps have begun to try to use SwiftUI.

    Although some simple layouts, SwiftUI is indeed very efficient in development. But in actual development, many problems will be encountered.

    1. The development concept is different from UIKit, which leads to unaccustomed.
    2. Some components only have UIKit and need to be encapsulated.
    3. There will be compatibility issues with different versions of Xcode and operating systems.
    4. Sometimes some writing methods lead to actual effects that do not meet expectations.
    5. And so on.

    I have encountered a situation where the State change does not take effect, and it is also possible that my usage is not completely correct.