TAILIEUCHUNG - Lập trình iphone chuyên nghiệp part 20

Packaging Apps as Bookmarks: Bookmarklets and Data URLs Bởi vì các ứng dụng iPhone và iPod touch chức năng bên trong của môi trường di động Safari, có hai hạn chế dường như rõ ràng cho các nhà phát triển web: Bạn phải sống với sự tích hợp khả năng của các trình duyệt di động Safari, và bạn cần một hằng số Wi-Fi (hoặc , cho iPhone, EDGE) kết nối để chạy bất kỳ ứng dụng. | Packaging Apps as Bookmarks Bookmarklets and Data URLs Because iPhone and iPod touch applications function inside of the Mobile Safari environment there are two seemingly obvious restrictions for the Web developer You must live with the built-in capabilities of the Mobile Safari browser and you need a constant Wi-Fi or for iPhone EDGE connection in order to run any application. The truth is that you can get around these limitations by taking advantage of two lesser-known technologies bookmarklets and data URLs. These technologies have actually been around for years but they have tended to exist on the periphery of mainstream Web development. However developers are now reexamining these two developer tools to maximize the potential of the iPhone application platform. Bookmarklets short for bookmark applets are mini JavaScript applets that can be stored as a bookmark inside of Safari. A data URL is a technique for storing an entire Web page or application pages styles images data and scripts inside of a single URL which can then be saved as an iPhone iPod touch Bookmark. This application-in-a-bookmark can then be accessed in offline mode. Bookmarklets A bookmarklet is JavaScript stored as a URL and saved as a bookmark in the browser. It is typically used as a one-click applet that performs a very specific task or performs an action on the current Web page. A bookmarklet uses the javascript protocol followed by script code. For instance here s the simplest of examples javascript alert iPhone Chapter 10 Packaging Apps as Bookmarks Bookmarklets and Data URLs Because the scripting code for a bookmarklet is housed inside of a URL the script must be condensed into one long string of code. Therefore to enter multiple statements separate each line with a semicolon javascript alert Bookmarklet 1 alert Bookmarklet 2 As you can see there are spaces inside each of the strings. You can either substitute 2 0 for a blank space or let Safari do the conversion for you. If the script

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.