Firm foundation in the main hci principles, the book provides a working


Download 4.23 Mb.
Pdf ko'rish
bet67/97
Sana23.09.2023
Hajmi4.23 Mb.
#1685852
1   ...   63   64   65   66   67   68   69   70   ...   97
Bog'liq
Human Computer Interaction Fundamentals

Figure 6.13 iOS UIKit A UI object hierarchy example.


10 9
U I D E V E L O P M E N T T O O L K I T
hit-test view and the first responder are often the same view object
they do not have to be the same. The UIApplication object and each 
UIWindow object dispatch events in the sendEvent: method.
A responder object is an object that can respond to events and 
handle them. UIResponder is the base class for all responder objects, 
also known simply as responders. It defines the programmatic inter-
face not only for event handling, but for common responder behav-
ior. UIApplicationUIView, and all UIKit classes that descend from 
UIView (including UIWindow) inherit directly or indirectly from 
UIResponder, and thus their instances are responder objects. The first 
responder is the responder object in an application (usually a UIView 
object) that is designated to be the first recipient of events other than 
touch events. A UIWindow object sends the first responder these 
events in messages, giving it the first shot at handling them.
If the first responder or the hit-test view does not handle an event
UIKit may pass the event to the next responder in the responder chain to 
see if it can handle it. The responder chain is a linked series of responder 
objects along which an event is passed. It allows responder objects to 
transfer responsibility for handling an event to other, higher-level 
objects. An event proceeds up the responder chain as the application 
NSObject
UIResponder
UIApplication
UIView
Controller
UIView
UILabel
UIImageView
UIControl
UIWindow
UIScrollView
UIButton
UISlider
UISwitch
UITextField

Download 4.23 Mb.

Do'stlaringiz bilan baham:
1   ...   63   64   65   66   67   68   69   70   ...   97




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling