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

前端 未结 6 1755
孤独总比滥情好
孤独总比滥情好 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 09:49

    Your diagram is just incorrect.

    Public members of A.swift and B.swift are available to C.swift and D.swift. The only restriction is that classes can't be subclassed (they would need to be open.

提交回复
热议问题