cocoa touch - Why is -init an instance method and +initialize a class method? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 1 उत्तर

कोको में, NSObject s, दोनों को init और आरंभ करने के लिए होना नहीं चाहिए class methods?

+ initialize ओवरराइड किया जा सकता है (यह वैकल्पिक है) वर्ग-चौड़ा प्रारंभ करने के लिए -init एक वर्ग के एक उदाहरण की प्रारंभिकता को पूरा करता है, हालांकि इसे अक्सर NSObject (उदा: UIView's initWithFrame: विधि) से प्राप्त कक्षाओं में तर्क जोड़कर परिष्कृत किया जाता है।

एचटीएमएल>

Comments

Popular posts from this blog

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -

javascript - parsing json not working -