Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (169.42 KB, 4 trang )
CÁC THÀNH PHẦN TRONG ỨNG DỤNG IOS(BÀI2)
Ở bài trước chúng ra đã tìm hiểu cách cài Xcode tool lập trình ios do Apple cung cấp .
Ở bài này chúng ta sẽ tìm hiểu công cụ lập trình Xcode, menu ,các file cơ bản nguyên
lý khởi tạo và chạy ứng dụng!
chúng ta cùng tiếp tục nào :
Các thành phần cơ bản của một app ios :
–file .h gồm :@interface khai báo : biến , fun ,class ,protocol…
–file .m: @implementation: thực thi
1. Tổng quan:
Xem thêm: Địa chỉ học lập trình ios ở đâu tốt nhất
FILE: AppDelegate: Mình đã commen các hàm cơ bản trong Appdelegate nội dung các
hàm ý nghĩa như sau:
1. // bắt đầu chạy khi app gọi
2.
3. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
4. // Override point for customization after application launch.
5. return YES;
6. }// sẽ chạy sau Didview
7.
8. - (void)applicationWillResignActive:(UIApplication *)application {
9. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary
interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the
transition to the background state.
10. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use
this method to pause the game.
11. }
12. // chạy khi app chạy ở chế độ nền