<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Responder Chain on Kelly Dev</title><link>https://kelly-chui.github.io/tags/responder-chain/</link><description>Recent content in Responder Chain on Kelly Dev</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 04 Sep 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://kelly-chui.github.io/tags/responder-chain/index.xml" rel="self" type="application/rss+xml"/><item><title>UIKit. Responder Chain</title><link>https://kelly-chui.github.io/posts/ios-uikit-responder-chain/</link><pubDate>Wed, 04 Sep 2024 00:00:00 +0000</pubDate><guid>https://kelly-chui.github.io/posts/ios-uikit-responder-chain/</guid><description>&lt;p&gt;앱에서 터치 입력과 같은 유저 인터랙션을 처리할 때, UIKit은 &lt;code&gt;UIResponder&lt;/code&gt; 객체를 통해 이벤트를 감지하고 적절히 처리한다. 그렇다면 이벤트가 발생했을 때, 어떻게 적절한 &lt;code&gt;UIResponder&lt;/code&gt; 객체를 찾아서 처리할까?&lt;/p&gt;
&lt;p&gt;UIKit에서 이벤트가 어떻게 전달되고 처리되는지, 특히 &lt;code&gt;UIResponder&lt;/code&gt;와 Responder chain의 흐름을 정리했다.&lt;/p&gt;
&lt;h2 id="uiresponder와-uievent"&gt;UIResponder와 UIEvent&lt;/h2&gt;
&lt;p&gt;개발자 문서에서 &lt;code&gt;UIResponder&lt;/code&gt;는 &amp;lsquo;이벤트에 응답하고 처리하기 위한 추상 인터페이스&amp;rsquo;로 소개한다. 여기서 이벤트란, UIKit에서 &lt;code&gt;UIEvent&lt;/code&gt;라는 클래스로 표현되는 단일 유저 인터랙션(예: 터치)을 의미한다. &lt;code&gt;UIEvent&lt;/code&gt; 역시 개발자 문서에서 &amp;lsquo;앱에서 단일 유저 인터랙션을 설명하기 위한 객체&amp;rsquo;라고 정의되어 있다.&lt;/p&gt;</description></item></channel></rss>