LoginSignup
0

More than 5 years have passed since last update.

Swift3.0のAccess Control

Last updated at Posted at 2016-11-23

Purpose

Personal Note

Access Control

Since Swift3.0 was released, Access Control has been changed.
"open" and "fileprivate" are new access controls.

open: Laxest access control. Can access from outside of modules
public: Can access from outside of modules, but cannot do "override" and make it as subclass
internal: Can access from inside of modules. Basically if you don't mention, parameter will apply this as default
fileprivate: Allow access from inside of file.
private: Strictest. Allow access from class

Swift3AcccesControl.png
(Image from swifting.io)

Reference

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0