Đang chuẩn bị liên kết để tải về tài liệu:
iPhone SDK 3 Programming Advanced Mobile Development for Apple iPhone and iPod touc phần 7

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Phong cách bảng khác có sẵn cho bạn là UITableViewStyleGrouped. Bạn tìm hiểu về các phong cách khác trong mục 9,9. Sau đó, chúng tôi cư theSimpsons mảng với tên sẽ được hiển thị bên trong bảng. Tiếp theo, các nguồn dữ liệu của chế độ xem bảng được thiết lập để thể hiện ủy nhiệm ứng dụng. | Location Awareness 387 Listing 13.8 shows the implementation of the application delegate class. The application-DidFinishLaunching method simply creates a view controller of type LocationsView-Controller and uses it as the root controller for a navigation controller. The view of the navigation controller is then added as a subview to the main window and the main window is made visible. Listing 13.8 The implementation of the application delegate class used in the tracking application. import Location3AppDelegate.h implementation Location3AppDelegate synthesize window - void applicationDidFinishLaunching UIApplication application window UlWindow alloc initWithFrame UIScreen mainScreen bounds ctrl LocationsViewController alloc initWithNibName nil bundle nil navCtrl UINavigationController alloc initWithRootViewController ctrl window addSubview navCtrl.view window makeKeyAndVisible - void dealloc ctrl release navCtrl release window release super dealloc end Our view controller is declared in Listing 13.9. The view controller adopts the CLLocation-ManagerDelegate as it will be the delegate of the location manager that it will create. It declares two bar buttons for stopping the sampling of movements navigating to the next recording and navigating to the previous recording. The right bar button will be used for both stopping the sampling of movements and as a Next button. In addition the view controller maintains a reference to a web view for visualizing the locations sampled. Listing 13.9 The declaration of LocationsViewController view controller class used in the tracking application. import UIKit UIKit.h import CoreLocation CoreLocation.h interface LocationsViewController UIViewController CLLocationManagerDelegate CLLocationManager locationMgr NSUInteger noUpdates NSMutableArray locations UIWebView webView 388 iPhone SDK 3 Programming UIBarButtonItem rightButton leftButton NSUInteger current end Listing 13.10 shows the implementation of the view controller. In the .

Đã 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.