profile
해피 코딩

Responder Chain Example

1. Responder Chain Example 상황 설명 : 상위 뷰(superview)로 GreyView(customized)가 있고 이 뷰의 하위 뷰(subview)로 MyLabel, MyButton, MyTextField(역시 모두 cutomized)가 있다. 아래 코드처럼 responder chain의 responder가 될 수 있는 AppDelegate, ViewController, GreyView, MyLabel, MyButton에 모두 touchesBegan을 재정의함.(MyTextField는 현재 상황과 관계 없으므로 제외함) 뷰들의 hierarchy

2020년 3월 1일
·
0개의 댓글
·