본문 바로가기
[iOS Study] 터치 이벤트와 UIResponder [iOS Study] 터치 이벤트와 UIResponder 출처 : 아론 힐리가스의 iOS 프로그래밍 -UIView 는 UIResponder 의 하위 클래스로서 각각 다른 터치 이벤트를 처리할 네 개의 메소드를 재정의할 수 있다. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; -화면을 .. 2016. 2. 24.
[Android] 제대로 된 REST API 를 구축해보자. [Android] 제대로 된 REST API 를 구축해보자. reference : http://mytechaddiction.blogspot.kr/2014/02/rest-interaction-in-android.html?utm_source=Android+Weekly&utm_campaign=4254f212fb-Android_Weekly_91&utm_medium=email&utm_term=0_4eb677ad19-4254f212fb-337262377 Anti-Patterns 1. UI Thread 에서 API Call. 2. Activity 나 Fragment 등에서 Thread 를 만들어 요청 3. 결과를 Memory 에만 저장하여 사용. Decouple the UI from the http call. Act.. 2014. 3. 18.
[android] Toast( 토스트 ) 이야기 안드로이드, Toast( 토스트 ) 이야기 Toast 의 특이한 점. Toast 생성은 메인 스레드에서만 가능하지만, show() 함수는 아무 스레드에서나 호출할 수 있다.이는 Toast 가 안에서 handler 를 사용하기 때문이다.생성할 때는 Handler 를 main thread 에서 생성해야 하기 때문에 main thread 에서 생성해야 하고, 그 외 함수들 호출은 아무데서나 해도 된다. Toast 는 독립적인 Window Window 들은 PhoneWindowManagerService 에서 관리한다. status bar, input method, activity 모두 window 이다. Toast 들은 여러 앱에서 동시에 불러도 하나씩 순차적으로 뜨는데, 그 이유는 NotificationMan.. 2013. 8. 14.
반응형