beginning iphone 3 development exploring the iphone sdk phần 9

Cài đặt ứng dụng biểu tượng là một phần ba trong cột cuối cùng. Nó có thể được trong một vị trí khác nhau trên iPhone của bạn hoặc iPod touch, nhưng nó luôn luôn có sẵn. Cài đặt ứng dụng và mặc định sử dụng | 438 CHAPTER 13 Taps Touches and Gestures Multitouch Terminology Before we dive into the architecture let s go over some basic vocabulary. First a gesture is any sequence of events that happens from the time you touch the screen with one or more fingers until you lift your fingers off the screen. No matter how long it takes as long as one or more fingers are still against the screen you are still within a gesture unless a system event such as an incoming phone call interrupts it . A gesture is passed through the system inside an event. Events are generated when you interact with the iPhone s multitouch screen and contain information about the touch or touches that occurred. The term touch obviously refers to a finger being placed on the iPhone s screen. The number of touches involved in a gesture is equal to the number of fingers on the screen at the same time. You can actually put all five fingers on the screen and as long as they aren t too close to each other iPhone can recognize and track them all. Now there aren t many useful five-finger gestures but it s nice to know the iPhone can handle one if it needs to. A tap happens when you touch the screen with a single finger and then immediately lift your finger off the screen without moving it around. The iPhone keeps track of the number of taps and can tell you if the user double-tapped or triple-tapped or even 20-tapped. It handles all the timing and other work necessary to differentiate between two single-taps and a double-tap for example. It s important to note that the iPhone only keeps track of taps when one finger is used. If it detects multiple touches it resets the tap count to one. The Responder Chain Since gestures get passed through the system inside of events and events get passed through the responder chain you need to have an understanding of how the responder chain works in order to handle gestures properly. If you ve worked with Cocoa for Mac OS X you re probably familiar with the concept of a .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
100    80    3    28-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.