Swift.vn
  • Introduction
  • Welcome To Swift
    • AboutSwift
    • A Swift Tour
      • Simple Values
      • Control Flow
      • Function and Closures
      • Object and classes
      • Enumertation and Structures
      • Protocols and Extensions
      • Generics
  • Laguage Guide
    • The Basic
      • Constant and variable
      • Comments
      • semicolons
      • Integers
      • Floating-point numbers
      • Type Safety and Type Reference
      • Numeric Literals
      • Numeric Type Conversion
      • Type Aliases
      • Booleans
      • Tuples
      • Optionals
      • Error Handling
      • Assertions
    • Basic Operators
      • Terminology
      • Assignment Operator
      • Arithmetic Operators
      • Compound Assignment Operators
      • Comparison Operators
      • Ternary Conditional Operator
      • Nil-Coalescing Operator
      • Range Operators
      • Logical Operators
    • String and Characters
      • String Literals
      • Initializing an Empty String
      • String Mutability
      • String Are Value Types
      • Working with Characters
      • Concatenating String and Characters
      • String Interpolation
      • Unicode
      • Counting Characters
      • Accessing and Modifying a String
      • Comparing Strings
      • Unicode Representing of Strings
    • Collection Types
      • Mutability of Collections
      • Arrays
      • Sets
      • Performing Set Operations
      • Dictionaries
    • Control Flow
      • For-In Loops
      • While Loops
      • Conditional Statements
      • Control Transfer Statements
      • Early Exit
      • Check API Availibility
    • Function
      • Defining and Calling Functions
      • Function Parameters and Return Values
      • Function Argument Labels and Parameter Names
      • Function Types
      • Nested Functions
    • Closure
      • Closure Expressions
      • Trailing Closures
      • Capturing Values
      • Closures Are References Types
      • Escaping Closures
      • Autoclosures
    • Enumerations
      • Enumeration Syntax
      • Matching Enumeration Values with a Switch Statement
      • Associated Values
      • Raw Values
      • Recursive Enumerations
    • Class and Structures
      • Comparing Classes and Structures
      • Structures And Enumerations Are Value Types
      • Classes Are Reference Type
      • Choosing Between Classes and Structures
      • Assignment and Copy Behavior For Strings, Arrays, and Dictionaries
    • Properties
      • Stored Properties
      • Computed Properties
      • Property Observers
      • Global and Local Variables
      • Typed Properties
    • Methods
      • Instance Methods
      • Type Methods
    • Subcript
      • Subscript Syntax
      • Subscipt Usage
      • Subscript Options
    • Inheritence
      • Defining a Base Class
      • Subclassing
      • Overriding
      • Preventing Overrides
    • Initialization
      • Setting Initial Values for Stored Properties
      • Customizing Initialization
      • Default Initializers
      • Initializer Delegation for Value Types
      • Class Inheritance and Initialization
      • Failable Initializers
      • Required Initializers
      • Setting a Default Property Value with a Closure or Function
    • Deinitialization
      • How Deinitialization Works
      • Deinitializers in Action
    • Auto Reference Counting
      • How ARC works
      • ARC in Action
      • Strong Reference Cycles Between Class Instances
      • Resolving Strong Reference Cycles Between Class Instances
      • Strong Reference Cycles for Closures
      • Resolving Strong Reference Cycles for Closures
    • Optional Chaining
      • Optional Chaining as an Alternative to Forced Unwrapping
      • Defining Model Classes for Optional Chaining
      • Accessing Properties Through Optional Chaining
      • Calling Methods Through Optional Chaining
      • Accessing Subscipts Through Optional Chaining
      • Linking Multiple Levels of Chaining
      • Chaining on Methods with Optional Return Values
    • Error Handling
      • Representing and Throwing Errors
      • Handling Errors
      • Specifying Cleanup Actions
    • Type Casting
      • Defining a Class Hierarchy for Type Casting
      • Checking Type
      • Down Casting
      • Type Casting for Any and AnyObject
    • Nested Types
      • Nested Types in Action
      • Referring to Nested Types
    • Extensions
      • Extension Syntax
      • Computed Properties
      • Initializers
      • Methods
      • Subscripts
      • Nested Types
    • Protocols
      • Protocol Syntax
      • Protocol Requirements
      • Method Requirements
      • Mutating Method Requirements
      • Initializer Requirements
      • Protocols as Types
      • Delegation
      • Adding Protocol Conformance with an Extension
      • Collections of Protocol Types
      • Protocol Inheritance
      • Class-Only Protocols
      • Protocol Composition
      • Checking or Protocol Conformance
      • Optional Protocol Requirements
      • Protocol Extensions
    • Generics
      • The Problem That Generics Solve
      • Generic Functions
      • Type Parameters
      • Naming Type Parameters
      • Generic Types
      • Extending a Generic Type
      • Type Constraints
      • Associated Types
      • Generic Where Clauses
    • Access Control
      • Modules and Source Files
      • Access Levels
      • Access Control Syntax
      • Custom Types
      • Subclassing
      • Constants, Variables, Properties, and Subscripts
      • Initializers
      • Protocols
      • Extensions
      • Generics
      • Type Aliases
    • Advanced Operators
      • Bitwise Operators
      • Overflow Operators
      • Precedence and Associativity
      • Operator Methods
      • Custom Operators
Powered by GitBook
On this page

Was this helpful?

  1. Laguage Guide

Access Control

Modules and Source FilesAccess LevelsAccess Control SyntaxCustom TypesSubclassingConstants, Variables, Properties, and SubscriptsInitializersProtocolsExtensionsGenericsType Aliases
PreviousGeneric Where ClausesNextModules and Source Files

Last updated 6 years ago

Was this helpful?