How does one use namespaces in iOS objective-c code?

前端 未结 2 1777
终归单人心
终归单人心 2021-01-11 10:38

I\'m writing an iOS app, \"Best Korea\". My organization name is \"Srsly.co\". I\'m going to write re-usable \"News\" libraries that I\'ll use across my apps.

Each

2条回答
  •  有刺的猬
    2021-01-11 10:43

    There is no NameSpace in Objective-C as you are expecting in Java.

    Objective-C uses class Prefix like NS, UI, CG, CF etc to safely remove name space collision.

    And it would be better to use 3 letter Prefix for your class.

    You should read this : What is the best way to solve an Objective-C namespace collision?

提交回复
热议问题