TAILIEUCHUNG - iOS App Programming Guide phần 5

Những thông báo này là cơ hội để bạn thay đổi hành vi ứng dụng của bạn. Trong khi ứng dụng của bạn ở phía trước, hệ thống sẽ gửi sự kiện liên lạc với nó để chế biến. Cơ sở hạ tầng UIKit hầu hết các công việc khó khăn của việc cung cấp các sự kiện cho các đối tượng tùy chỉnh của bạn. | CHAPTER 3 App States and Multitasking It releases some other system-managed data caches. Returning to the Foreground Returning to the foreground is your app s chance to restart the tasks that it stopped when it moved to the background. The steps that occur when moving to the foreground are shown in Figure 3-6. The applicationWillEnterForeground method should undo anything that was done in your applicationDidEnterBackground method and the applicationDidBecomeActive method should continue to perform the same activation tasks that it would at launch time. Figure 3-6 Transitioning from the background to the foreground Managing App State Changes 2011-10-12 2011 Apple Inc. All Rights Reserved. 46 CHAPTER 3 App States and Multitasking Note The UIApplicationWillEnterForegroundNotification notification is also available for tracking when your app reenters the foreground. Objects in your app can use the default notification center to register for this notification. Processing Queued Notifications at Wakeup Time An app in the suspended state must be ready to handle any queued notifications when it returns to a foreground or background execution state. A suspended app does not execute any code and therefore cannot process notifications related to orientation changes time changes preferences changes and many others that would affect the app s appearance or state. To make sure these changes are not lost the system queues many relevant notifications and delivers them to the app as soon as it starts executing code again either in the foreground or background . To prevent your app from becoming overloaded with notifications when it resumes the system coalesces events and delivers a single notification of each relevant type that reflects the net change since your app was suspended. Table 3-2 lists the notifications that can be coalesced and delivered to your app. Most of these notifications are delivered directly to the registered observers. Some like those related to device .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.