Distinction between private and fileprivate top-level classes

前端 未结 1 1858
臣服心动
臣服心动 2021-01-21 12:22

In Swift 3, what exactly is the difference in access control between

private class Foo { }

and

fileprivate class Bar { }


        
相关标签:
1条回答
  • 2021-01-21 13:10

    There is no difference in your case. The only time that fileprivate differs from private is inside a class, struct, or protocol.

    0 讨论(0)
提交回复
热议问题