Swift5 Samples
๊ฐ๊ณผ ๋ณ์, ์์, ๋ฌธ์ฅ ์์ฑ ๋ฐฉ๋ฒ
- Literal_Number : ์ซ์ํ ๊ฐ
- Literal_String : ๋ฌธ์ํ ๊ฐ
- Literal_Range : ๋ฒ์๊ฐ
- Nil : nil
- VarAndConstant : ๋ณ์์ ์์
- Print : ์ฝ์์ ๊ฐ ์ถ๋ ฅํ๊ธฐ
- Statement : Swift ์ฝ๋ ๋ฌธ์ฅ ์์ฑํ๊ธฐ
- Operator : ์ฐ์ฐ์
Swift์ ๊ธฐ๋ณธ ํ์
- Bool : ๋ถ์ธ ํ์
- Int : ์ ์ํ ํ์
- Float : ์ค์ํ ํ์
- Character : Character ํ์
- String : ๋ฌธ์์ด ํ์
- String_Modify : ๋ฌธ์์ด ์์
- String_Substring : ๋ถ๋ถ ๋ฌธ์์ด
- String_Compare : ๋ฌธ์์ด ๋น๊ต
- String_Views : ๋ฌธ์์ด๊ณผ ๋ทฐ
- String_Founcation : ํ์ด๋ฐ์ด์ ํ๋ ์์ํฌ - ํฌ๋งท ๋ฌธ์์ด ์์ฑ, ๋ฌธ์์ด ๋น๊ต, ํธ๋ฆฌ๋ฐ, ์ฐพ๊ธฐ
- String_IO : ๋ฌธ์์ด ์ ์ฅ/์ฝ๊ธฐ. Foundation ํ์
- Range : Range, ClosedRange, CountableRange, PartialRangeThrough ํ์
- TypeOf : ํ์ ์ ๋ณด ์ป๊ธฐ
- Unicode : ์ ๋์ฝ๋ ๋ค๋ฃจ๊ธฐ(์์ฑ์ค)
๋ค์์ ๋ฐ์ดํฐ๋ฅผ ๋ค๋ฃจ๋ ํ์
- Tuple : ํํ
- Array : ๋ฐฐ์ด
- Dictionary : ๋์ ๋๋ฆฌ
- Set : ์
- ComplexCollection : ๋ณตํฉ ์ฝ๋ ์ ํ์
- ValueType : ๋ฐธ๋ฅ ํ์
Swift์ ๋ฐ๋ณต, ์กฐ๊ฑด๋ฌธ
- for : for ๋ฐ๋ณต๋ฌธ
- while : while, repeat-while ๋ฐ๋ณต๋ฌธ
- label : label์ ์ด์ฉํ ํ๋ฆ ์ ์ด๋ฌธ
- if : if ์กฐ๊ฑด๋ฌธ
- guard : guard
- switch_case : switch-case
- version-check : #avilable์ ์ด์ฉํ ํ๋ซํผ, ๋ฒ์ ์ฒดํฌ
- Optional : ์ต์ ๋ ํ์
- NilCheck : nil ์ฌ๋ถ ํ์ธํ๊ธฐ
- ForcedUnwrapping: ๊ฐ์ ์ธ๋ํ
- OptionalBinding : ์ต์ ๋ ๋ฐ์ธ๋ฉ, if/guard ์ฌ์ฉ
- NilCoalescing : nil ๋ณํฉ ์ฐ์ฐ์ ??
- OptionalChain : ์ต์ ๋ ์ฒด์ธ
- IUO : ์์์ ์ธ๋ํ ์ต์ ๋(Implicitly Unwrapped Optional)
์ปค์คํ ํ์ ์ ์ํ๊ธฐ
- Struct : ๊ตฌ์กฐ์ฒด๋ก ์ปค์คํ ํ์ ์ ์ํ๊ธฐ
- Class : ํด๋์ค๋ก ์ปค์คํ ํ์ ์ ์ํ๊ธฐ
- Enum : Enum์ผ๋ก ์ปค์คํ ํ์ ์ ์ํ๊ธฐ
- Complex : ๋ณตํฉ ํ์ ์ ์
- Typealias : ํ์ ๋ณ์นญ ์ ํ๊ธฐ
- ValueAndReferenceType : ๋ฐธ๋ฅ ํ์ , ๋ ํผ๋ฐ์ค ํ์
ํจ์ ์ ์์ ์คํํ๊ธฐ
- Function : ํจ์ ์ ์, ์คํํ๊ธฐ, ๋ฐํ๊ฐ
- Parameter : ํจ์ ํ๋ผ๋ฏธํฐ, ์ธ๋ถ ํ๋ผ๋ฏธํฐ ์ค์
- overloading : ๊ฐ์ ํจ์ ์ด๋ฆ but ๋ค๋ฅธ ํจ์ ํ๋ผ๋ฏธํฐ ํ์ , ๋ค๋ฅธ ์ธ๋ถ ํ๋ผ๋ฏธํฐ ์ด๋ฆ.
- ParameterDefaultValue : ๊ธฐ๋ณธ๊ฐ์ ๊ฐ์ง ํ๋ผ๋ฏธํฐ
- ParameterVaridic : ๊ฐ๋ณ ๊ธธ์ด ํ๋ผ๋ฏธํฐ
- ParameterInout : Inout ํ๋ผ๋ฏธํฐ
- OptionalParamReturn : ํ๋ผ๋ฏธํฐ๋ ๋ฐํ๊ฐ์ผ๋ก nil ๋ค๋ฃจ๊ธฐ
- NestedFunction : ํจ์ ๋ด๋ถ์ ํจ์ ์ ์ํ๊ธฐ
- StoredAndComputedProperty : ์ ์ฅ ํ๋กํผํฐ, ์ฐ์ฐ ํ๋กํผํฐ
- PropertyChange : ํ๋กํผํฐ ๋ณ๊ฒฝ ๊ฐ์ง
- StructAndMethod : ๊ตฌ์กฐ์ฒด์ ๋ฉ์๋
- StructAndMutating : Mutatable ๋ฉ์๋ ์์ฑ
- StructAndStaticMethod : ์ ์ ๋ฉ์๋์ ์ ์ ํ๋กํผํฐ
- StructAndInitializer : ๊ตฌ์กฐ์ฒด ์ด๊ธฐํ
-
EnumAndMethod : Enum ํ์ ๊ณผ ๋ฉ์๋
-
EnumAndAssociation : Enum๊ณผ Association Value
-
NestedType : ์ค์ฒฉ ํ์
-
ImmutableAndMutable : Mutable API, Immutable API
- ClassAndInstance : ํด๋์ค ์ ์์ ๊ฐ์ฒด ์์ฑ, ํ๋กํผํฐ
- ComputedProperty : ์ฐ์ฐ ํ๋กํผํฐ
- ClassAndMethod : ํด๋์ค ๋ด ๋ฉ์๋ ์ ์์ ํธ์ถ
- ReferenceType : ํด๋์ค๋ ๋ ํผ๋ฐ์ค ํ์
- PropertyLazy : ๋ฆ์ ์ด๊ธฐํ(Lazy initialize) ํ๋กํผํฐ
- DesignatedInitializer : ํด๋์ค์ Designated Initializer
- ConvenienceInitializer : Convenince Initializer
- FailableInitializer : Failable Initializer
- Deinitializer : Deinitializer
- InheritanceAndOverride : ํด๋์ค ์์๊ณผ ๋ฉ์๋ ์ฌ์ ์
- InheritanceAndInitializer1 : ํด๋์ค ์์๊ณผ ๋ถ๋ชจ ํด๋์ค์ Initializer ์์ - ์์ ํด๋์ค์ Designated Initializer ์์ฑ ์ํจ
- InheritanceAndInitializer2 : ํด๋์ค ์์๊ณผ ๋ถ๋ชจ ํด๋์ค์ Initializer ์์ - ์์ ํด๋์ค๊ฐ ๋ถ๋ชจ ํด๋์ค์ ๋ชจ๋ Designated ์ฌ์ ์
- InheritanceAndInitializerNotInherited : ์์ ํด๋์ค์ Designated Initializer ์์ฑ - Initializer ์์ ์ํจ
- InitializerAndFailableInitializer : Failable Initializer ์ฌ์ ์
- InheritanceAndRequiredInitializer : Required Initializer ์์ฑํ๊ธฐ
- type_method : ํ์ ๋ฉ์๋
- type_property : ํ์ ํ๋กํผํฐ
- property_observing : ํ๋กํผํฐ ๊ฐ์
- property_lazy : ๋ฆ์ ํ๋กํผํฐ ์ด๊ธฐํ
- ์์, ์ฌ์ ์
- override : ์์๊ณผ ์ฌ์ ์
- super_self : ํด๋์ค ์์๊ณผ self, super ์ฐธ์กฐ
- initializer_inherite1 : Initializer ์์. ์์ ํด๋์ค์ Designated Initializer๋ฅผ ์์ฑํ์ง ์์ ๊ฒฝ์ฐ
- initializer_in_child : ์์ ํด๋์ค์ Designated Initializer ์์ฑํ๊ธฐ
- initializer_in_child_convenience : ์์ ํด๋์ค์ Convenience Initializer ์์ฑํ๊ธฐ
- initializer_override : Initializer ์ฌ์ ์
- initializer_inherite2 : Initializer ์์. ์์ ํด๋์ค์์ ๋ชจ๋ Designated Initializer๋ฅผ ์ฌ์ ์ํ๋ ๊ฒฝ์ฐ Convenience Initializer ์์
- two_phase_initialization : 2๋จ๊ณ ์ด๊ธฐํ
- initializer_override_failable : Failable initializer ์ฌ์ ์
- function_object : ํจ์๋ฅผ ๊ฐ์ฒด๋ก ๋ค๋ฃจ๊ธฐ
- function_type : ํจ์ ํ์
- array_sort : ๋ฐฐ์ด์ API์์ ํด๋ก์ ์ฌ์ฉ
- closure_api : ํด๋ก์ ์ฌ์ฉ ํจ์ ์์ฑํ๊ธฐ
- closure_inClass : ํด๋์ค ๋ด ๋ฉ์๋์ ํ๋กํผํฐ๋ก ์ฌ์ฉํ๊ธฐ
- capture : ํด๋ก์ ์ ์บก์ถฐ
- capture_reference : ํด๋ก์ ์ ๊ฐ์ฒด ์บก์ถฐ, ์บก์ถฐ์ ๊ฐ์ฒด ์์ ํ์ง ์๊ธฐ(unowned)
- escaping : non-escaping, escaping ํด๋ก์
- autoclosure : autoclosure
- protocol_basic : ํ๋กํ ์ฝ ์ ์ธ, ํด๋์ค์ ๊ตฌ์กฐ์ฒด ์ฑํ
- static_method : ํ๋กํ ์ฝ ๋ด ํ์ ๋ฉ์๋
- property : ํ๋กํ ์ฝ ๋ด ํ๋กํผํฐ ์ ์ธ
- initializer : ํ๋กํ ์ฝ ๋ด Initializer ์ ์ธ
- protocol_type : ํ๋กํ ์ฝ์ ํ์ ์ผ๋ก ์ฌ์ฉ
- class_only : ํด๋์ค ์ ์ฉ ํ๋กํ ์ฝ
- protocol_extension : ํ๋กํ ์ฝ ํ์ฅ
- ๊ฐ์ฒด ์์ฑ๊ณผ ํด์ , ์์ ๊ถ
- arc_basic : ๊ฐ์ฒด ์์ฑ๊ณผ ์์ , ๊ฐ์ฒด ํด์
- scope : ์ค์ฝํ์ ์ํ ์์ ๊ถ ํด์ ์ ๊ฐ์ฒด ํด์
- collection : ์ฝ๋ ์ ์ ์ํ ๊ฐ์ฒด ์์ ์ ํด์
- ๊ฐ์ฒด ์ํ ์ฐธ์กฐ(์์ ), ์ฝํ ์ฐธ์กฐ
- reference_cycle : ๊ฐํ ์ํ ์ฐธ์กฐ๋ก ์ธํ ๊ฐ์ฒด๊ฐ ํด์ ๋์ง ์๋ ์ํฉ
- weak : ๊ฐ์ฒด๋ฅผ ์์ ํ์ง ์๋ ์ฝํ ์ฐธ์กฐ(weak reference)
- unowned : ๊ฐ์ฒด๋ฅผ ์์ ํ์ง ์๋ ์ฝํ ์ฐธ์กฐ ์ค unowned
- any : Any, AnyObject ํ์ . ๋์ ์ธ ํ์ ๋ณ๊ฒฝ
- type_check : is๋ฅผ ์ด์ฉํ ํ์ ์ฒดํฌ
- type_cast : as๋ฅผ ์ด์ฉํ ํ์ ๋ณํ
- type_alias : ํ์ ์๋ฆฌ์์ค
- extension : ํ์ ํ์ฅ
- extension_struct_enum : ๊ตฌ์กฐ์ฒด์ Enum ํ์ฅ
- extension_existing_type : ๊ธฐ์กด ํ์ ํ์ฅ(String)
- ์๋ฌ ์ ์, ์๋ฌ ๋ค๋ฃจ๊ธฐ
- error : ์๋ฌ ์ ์, ์๋ฌ ๋ฐ์๊ณผ ๋ค๋ฃจ๊ธฐ
- error_function : ์๋ฌ๊ฐ ๋ฐ์ํ๋ ํจ์ ์์ฑ, ํธ์ถ. ๋ฐํ๊ฐ
- error_propagation : ์๋ฌ ์ ํ
- error_closure : ์๋ฌ ๋ฐ์ ํด๋ก์ ์ฌ์ฉํ๊ธฐ.
- defer : defer๋ฅผ ์ด์ฉํ ์์ธ ์ํฉ ๋ง๋ฌด๋ฆฌ ๋์
- generics : ๋ฐฐ์ด๊ณผ ๋์ ๋๋ฆฌ ํ์ ๋ณ ๊ฐ์ฒด ์์ฑ๊ณผ ์ฌ์ฉ
- custom_type_generics : ์ ๋ค๋ฆญ์ค๋ก ํ์ ์ถ์ํ๋ ํจ์์ ํ์ ์์ฑํ๊ธฐ
- ์ฐ์ฐ์
- overloading : ์ฐ์ฐ์ง ์ค๋ฒ๋ก๋ฉ
- equal : ๊ฐ์ฒด ๋น๊ต ์ฐ์ฐ์ ์ค๋ฒ๋ก๋ฉ
- custom_operator : ์๋ก์ด ์ฐ์ฐ์ ์ ์ธ, ์ ์
- ์ฒจ์ ํ๊ธฐ๋ฒ
- subscript : ์ฒจ์ ํ๊ธฐ
- AccessLevel : ์ปค๋งจ๋๋ผ์ธ ํ๋ก์ ํธ ๋ด ํ๋ ์์ํฌ๋ฅผ ์ฌ์ฉํ ์ ๊ทผ ์กฐ์ ์์ . ๋์์ํ๋ ์ฝ๋ ์์ฑ๊ณผ ์ปดํ์ผ๋ง ์ฐธ๊ณ .
- AccessLevelApp : iOS ํ๋ก์ ํธ ๋ด ํ๋ ์์ํฌ๋ฅผ ์ฌ์ฉํ ์ ๊ทผ ์กฐ์ ์์ . ๋์ํจ.
- singleton : ์ฑ๊ธํค ํจํด
- NSObject
- nsobject_equal : NSObject์ ๊ฐ์ฒด ๋น๊ต isEqual(_:)
- nsobject_typecheck : NSObject์ ๊ฐ์ฒด ๋น๊ต : isKind(of:), isMember(of:)
- selector : Selector
- selector_ambiguous : Selector Ambiguous ์๋ฌ์ ํด๊ฒฐ ๋ฐฉ๋ฒ
- selector_perform : ์ ๋ ํฐ ๋์ ๊ฒ์ฌ์ ์คํ
- nsobject_description : ๊ฐ์ฒด ์ค๋ช
- Protocol
- protocol_optional : ํ๋กํ ์ฝ ๋ด ์ ํ์ ๊ตฌํ ํญ๋ชฉ
- ๋ฐ์ดํฐ ๋ค๋ฃจ๊ธฐ
- type_convert : Foundation Framework ๋ฐ์ดํฐ ํ์ ๊ณผ Swift ํ์ ๊ฐ ๋ณํ
- ๋ฌธ์์ด
- string1, string2 : NSString, String ๋ค๋ฃจ๊ธฐ์ ๋น๊ต
- string_file : ๋ฌธ์์ด ์ ์ฅ
- string_referenceType : Reference ํ์ ์ธ NSString
- string_mutable : NSMutableString
- ๋ฐฐ์ด
- array : NSArray, Array ๋น๊ต, ๋ค๋ฃจ๊ธฐ
- array_file : ๋ฐฐ์ด ํ์ผ ์ ์ฅ
- array_mutable : Mutable Array
- ๋์
๋๋ฆฌ
- dictionary : Dictioanry, NSDictionary ๋น๊ต, ๋ค๋ฃจ๊ธฐ
- dictionary_file : ๋์ ๋๋ฆฌ ํ์ผ ์ ์ฅ
- ๋ ์ง์ ์๊ฐ
- date : ๋ ์ง, ๋ ์ง ํฌ๋งทํฐ, ์นผ๋ ๋ ๋ค๋ฃจ๊ธฐ
- ํ์ผ ๋ค๋ฃจ๊ธฐ
- fm_list : ํ์ผ ๋งค๋์ ๋ก ํ์ผ ๋ชฉ๋ก
- fm_copyremove : ํ์ผ ๋งค๋์ ๋ก ํ์ผ ์กด์ฌ ํ์ธ/๋ณต์ฌ/์ญ์
- fm_read : FileHandler๋ก ํ์ผ ๋ด์ฉ ์ฝ๊ธฐ/์ฐ๊ธฐ
- ๋ฐ์ดํ
- data_base64 : Data๋ฅผ ์ด์ฉํ Base64 ์ธ์ฝ๋ฉ/๋์ฝ๋ฉ
- ์ง๋ ฌํ
- archive1 : NSKeyedArchiver, Unarchiver
- archive2 : Custom Class, NSCoding
- ํ์ด๋จธ
- timer : ํ์ด๋จธ ์์
- ์๋ฆผ
- notification : ์๋ฆผ
- ๋ฉํฐ์ฐ๋ ๋
- thread1 : Thread๋ฅผ ์ฌ์ฉํ ๋ฉํฐ ์ฐ๋ ๋
- thread2 : ํ ๊ธฐ๋ฐ์ ๋ฉํฐ ์ฐ๋ ๋
- ๋คํธ์ํฌ
- url : URL ์์ฑ. ์ ๋ณด ์ป๊ธฐ
- url_resource_loading
- JSON
- json_parsing