[Kotlin Tutorial] Operator overload 와 convention #2 [Kotlin Tutorial] Operator overload 와 convention #2 출처 : Kotlin in action 7.3. Destructuring declarations and component functions -val p = Point(10, 20)val (x, y) = p // destructuringprintln(x)println(y) -destructuring 도 convention 을 사용한다.componentN 이 호출된다. ( N 은 숫자 )val (a, b) = p // val a = p.component1()// val b = p.component2() -data class 는 compiler 가 primaryConstructor 에 정의된 모든 property 에 .. 2017. 8. 29. [iOS Study] 델리게이션과 텍스트 입력 [iOS Study] 델리게이션과 텍스트 입력 출처 : 아론 힐리가스의 iOS 프로그래밍 -UITextField 인스턴스는 사용자가 텍스트를 수정할 수 있게 해준다. -UIResponder 는 UIKit 프레임워크에 존재하는 추상 클래스이다.다음 세 클래스는 UIResponder 의 하위 클래스이다. UIView, UIViewController, UIApplication UIResponse 는 이벤트를 제어하는 메소드들을 정의한다.이벤트에는 터치 이벤트, 흔들기와 같은 모션 이벤트, 재생/정지와 같은 원격 제어 이벤트 등이 있다.하위 클래스들은 이런 이벤트에 응답하기 위해 각각에 따라 이들 메소드를 재정의한다. -UIWindow 는 다른 이벤트들에 응답할 객체를 가리키는 퍼스트 리스폰더 (first re.. 2016. 2. 19. 반응형 이전 1 다음