You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say that importantPostInitializationSetup can't be done inside the initializer for some reason. Now, I know I could code my assembly like the following:
Yes! No problem at all. All of the Objective-C idioms work. An initializer can be a class/factory method (also works with class clusters) or a regular initializer.
Swift Gotcha! In Swift when you create a factory method that points to an init, sometimes Swift will just directly map to the init, so the extra code in the factory/class initializer won't run!
Please in future post general questions to StackOverflow as it helps other users, and shares the support load, so that we can keep improving Typhoon.
Suppose I have my Knight class as follows:
Let's say that importantPostInitializationSetup can't be done inside the initializer for some reason. Now, I know I could code my assembly like the following:
But this exposes the importantPostInitializationSetup method. I'd rather use a class convenience method like the following:
Is it possible to use + knightWithQuest inside a Typhoon definition?
Thanks!
The text was updated successfully, but these errors were encountered: