Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- list
- viewlifecycle
- Switch
- uikit
- http
- 글또
- self
- SWIFTUI
- apns
- Animation
- array
- escaping
- struct
- class
- PushNotification
- singleton
- 고차함수
- NotificationCenter
- Observer
- ScrollView
- Refresh
- 화면전환
- IOS
- protocol
- mvvm
- SWIFT
- calendar
- Git
- error
- segue
Archives
- Today
- Total
목록Any (1)
seong_hye, the developer
Swift) 문법 정리 - 타입 캐스팅(Type Casting) / Any, AnyObject
타입 캐스팅이란?인스턴스의 타입을 확인하거나 어떠한 클래스의 인스턴스를해당 클래스 계층 구조의 슈퍼클래스나 서브 클래스로 취급하는 방법 - 메모리 값을 수정하는 것은 아님- 단순히 해당 타입의 인스턴스인 것처럼 취급하려는 목적class Person { var id = 0 var name = "이름" var email = "abc@gmail.com"}class Student: Person { var studentId = 1}class Undergraduate: Student { var major = "전공"}let person = Person()let student = Student()let undergraduate = Undergradutae()is 연산자타입에 대한 검사를 수행하는 연산자 (..
IOS
2022. 7. 12.