Swift 3: The difference between Public and Internal access modifiers?

前端 未结 6 1756
孤独总比滥情好
孤独总比滥情好 2020-12-15 09:16

I read the Apple\'s reference about access modifiers in Swift 3. I read also about the same on stackoverflow but I didn\'t get an answer as the person who asked. As I unders

6条回答
  •  轮回少年
    2020-12-15 10:01

    Whatever you marked as public can be used within your app and outside of your app(module). If you marked something as internal that can only be used within your app(module). This is very helpful when you're developing a library (framework), you can use internal to hide library structure.

提交回复
热议问题