TAILIEUCHUNG - Praise for The iPhone Developer’s Cookbook 2nd phần 6

và thanh công cụ, dành thời gian để đọc các Hướng dẫn giao diện con người của Apple, có sẵn như là một phần của tiêu chuẩn A GameKit chứng minh làm thế nào để làm như vậy đã được thêm vào đoạn code mẫu đi kèm với chương này. | Recipe Tappable Overlays 411 - void action id sender Add the subview addSubview Start the activity indicator UIActivityIndicatorView viewWithTag 202 startAnimating Call the finish method on delay self performSelector @selector finish withObject nil afterDelay Get This Recipe s Code To get the code used for this recipe go to http erica or if you ve downloaded the disk image containing all of the sample code from the book go to the folder for Chapter 10 and open the project for this recipe. Recipe Tappable Overlays Use custom overlays to present information as well as to establish modal sequences. Recipe 10-9 creates a custom class called tapped this view removes itself from the screen. This behavior makes it particularly suitable for showing information in a way normally reserved for the UIAlertView class. To use this class create a view instance in Interface Builder. Add as many subviews and design elements as needed. Use File Read Class Files to import the header change the view class from UIView to TappableOverlay using the Identity Inspector Command-4 and save the project. To present the view add it to the window just as Recipe 10-8 did. - void action id sender Add the overlay addSubview No further programming is needed. The view waits for a user tap and when one is received it removes itself from the window. Figure 10-8 shows a simple example of this kind of overlay it displays Tap to Continue. It s easy to see how you can extend this concept to show any kind of pertinent information creating a custom alternative to the UIAlertView with Recipe 10-8 this example does not use any orientation awareness. 412 Chapter 10 Alerting Users Figure 10-8 This simple overlay dismisses itself on receiving a user touch. Recipe 10-9 Building a Custom Dismissible Alert View That Responds to User Taps interface .

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.