6
निम्नलिखित कोड को देखते हुए। । । .classForCoder()
का उपयोग करना आवश्यक है, .class()
पर हमला किया गया है। यह निश्चित रूप से .class()
की तुलना में अनजान है। क्या कोई विकल्प है जो बेहतर पठनीयता प्रदान करता है?स्विफ्ट:</p> <pre><code>return TyphoonDefinition.withClass(AppDelegate.classForCoder()) { (definition) in definition.injectProperty("assembly") }) </code></pre> <p>: .classForCoder लिए वैकल्पिक()