tailieunhanh - iPhone SDK 3 Programming Advanced Mobile Development for Apple iPhone and iPod touc phần 10

Xem hình 19,9. 10. Chọn các thực thể luận và thêm một mối quan hệ như thể hiện trong hình 19,10. Chú ý rằng chúng ta lựa chọn ngược được ý kiến đóng góp và quy tắc xóa được Không có hành động. Sơ đồ mô hình kết quả được hiển thị trong hình 19,11. | F Working with Interface Builder In this appendix we use Interface Builder to build a couple of iPhone applications. The techniques you learn from building these applications should prove to be useful in building similar iPhone applications. National Debt Clock Application In this section we develop the National Debt Clock application. The application s UI is developed using Interface Builder. A screenshot of the completed product is shown in Figure . Creating the project Launch XCode. Click on File New Project. Click on the Application category under iPhone OS. Choose Window-based Application and click on Choose. Name the project NationalDebt and click Save. Creating the view controller class Right-click on the Classes group and select Add New File as shown in Figure . Select uiviewController subclass under the Cocoa Touch Class as shown in Figure and click on Next. Name the file make sure that the check box for generating the header file is checked and click Finish. As the screenshot of the application in Figure shows there are four main UI elements A label. An instance of UlLabel is used to show the text National Debt Clock. This is a static text that our application need not change. No code in our controller needs to know about this UI element. 592 iPhone SDK 3 Programming Figure A screenshot of the National Debt Clock application. Croups Files S NationalDebt B Add I H Ẽ Natior Open With Finder T Reveal in Finder h Natior New File. New Group New Target. New Custom Executable. Figure Adding a new class. An activity indicator. An instance of the UlActivityindicatorView class is used to indicate that we are busy fetching the image representing the national debt figure from the Internet. Our controller code needs to know about this UI element. To connect an object in our controller s code with this UI element we need to add an Interface Builder outlet property of type uiActivityindicatorView. In .

crossorigin="anonymous">
Đã 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.