TAILIEUCHUNG - Lập trình iPhone part 4

Giao diện người dùng thú vị hơn trong chương 3, chúng ta đã thảo luận về mô hình conceept-view-controller và xây dựng một ứng dụng ý tưởng vào cuộc sống. Bạn đã học về các cửa hàng, hành động và sử dụng chúng để tie một nút để kiểm soát một nhãn văn chương này, chúng ta sẽ xây dựng một ứng dụng,nó sẽ đòi hỏi kiến thức của bạn kiểm soát đến một cấp độ hoàn toàn mới. | 4 More User Interface Fun n Chapter 3 we discussed the Model-View-Controller concept and built an application that brought that idea to life. You learned about outlets and actions and used them to tie a button control to a text label. In this chapter we re going to build an application that will take your knowledge of controls to a whole new level. We ll implement an image view a slider two different text fields a segmented control a couple of switches and an iPhone button that looks more like well an iPhone button. You ll learn howto use the view hierarchy to group multiple items under a common parent view and make manipulating the interface at runtime easier. You ll see how to set and retrieve the values of various controls both by using outlets and by using the sender argument of our action methods. After that we ll look at using action sheets to force the user to make a choice and alerts to give the user important feedback. We ll also learn about control states and the use of stretchable images to make buttons look the way they should. Because this chapter s application uses so many different user interface items we re going to work a little differently than we did in the previous two chapters. We re going to break our application into pieces implementing one piece at a time bouncing back and forth between Xcode Interface Builder and the iPhone simulator and testing each piece before we move on to the next. Breaking the process of building a complex interface into smaller chunks will make it much less intimidating and will make it more closely resemble the actual process you ll go through when building your own applications. This code-compile-debug cycle makes up a large part of a software developer s typical day. 53 54 CHAPTER 4 More User Interface Fun A Screen Full of Controls As we mentioned the application we re going to build in this chapter is a bit more complex than was the case in Chapter 3. We re still only going to use a single view and controller but

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.