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.
- The development concept is different from UIKit, which leads to unaccustomed.
- Some components only have UIKit and need to be encapsulated.
- There will be compatibility issues with different versions of Xcode and operating systems.
- Sometimes some writing methods lead to actual effects that do not meet expectations.
- 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.