ImageVerifierCode 换一换
格式:DOCX , 页数:58 ,大小:159.78KB ,
资源ID:18590371      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18590371.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(WebKitDisplayWebContentWord文档下载推荐.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

WebKitDisplayWebContentWord文档下载推荐.docx

1、with respect to any of the technology describedin this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled computers.1 Infinite Lo

2、opCupertino, CA 95014408-996-1010Apple, the Apple logo, Carbon, Cocoa, Mac, Mac OS, Objective-C, Pages, QuickTime, Safari, and Xcode are trademarks of Apple Inc., registered in the United States and other countries.WebScript is a trademark of Apple Inc.Java is a registered trademark of Oracle and/or

3、 its affiliates.Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED “AS IS,” AND YOU, THE

4、 READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages.THE WARRANTY AND REME

5、DIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.Some states do not allow the exclusion or limitation of implied warranties or liabili

6、ty for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.ContentsIntroduction to WebKit Objective-C Programming Guide 9What Is the WebKit? 9W

7、ho Should Read This Document?Organization of This Document 10See Also 11Why Use the WebKit? 13Core WebKit Classes 15Frame Model and View Classes 15Data Model and View Classes 16Provisional vs. Committed Data Sources 17WebView Delegates 18Simple Browsing 21Multiple Windows 23Opening Windows 23Enterin

8、g URLs 23Handling New Window Requests 24Loading Pages 27Sequence of Frame Load Delegate Messages 27Testing for the Main Frame 28Displaying the Current URL 28Displaying the Page Title 28Displaying Load Status 29Loading Resources 31Sequence of Resource Load Delegate Messages 31Identifying Resources 31

9、Tracking Resource Load Progress 32Paging Back and Forward 35Enabling and Disabling the Back-Forward List 35Adding Back and Forward Buttons 3532009-07-28 | 2003, 2009 Apple Inc. All Rights Reserved.Setting the Page Cache 35Setting the Capacity 36The Current Item 36Managing State 36Managing History 37

10、Sharing History Objects 37Adding and Removing History Items 37Loading a History Item 38Saving and Loading History Objects 38Making Policy Decisions 39Enabling Editing 41Saving and Loading Web Content 43Modifying the Current Selection 45Changing Editing Behavior 47Should Methods 47Did Methods 47Using

11、 Undo When Editing 49Using the Document Object Model from Objective-C 51Interpreting the DOM Specification 51Handling Exceptions 53Using the Document Object Model Extensions 55Using JavaScript From Objective-C 57Spoofing 59Accessing the WebKit From Carbon Applications 61Determining WebKit Availabili

12、ty 63Testing for URL Loading System Availability 634Testing for WebKit Availability 63Isolating Your WebKit and URL Loading System Symbols 64Conditionally Loading Code 64Weak Linking Symbols 64Document Revision History 6756Figures and ListingsFigure 1 WebView and WebFrameView objects 16Figure 2 WebF

13、rame and WebDataSource objects 17Figure 3 Typical website 18Listing 1 Determining if the URL Loading system is available. 63Listing 2 Determining if the WebKit framework is available 63Listing 3 Loading WebKit constants dynamically using CFBundle 6578Introduction to WebKit Objective-C Programming Gu

14、ideConcurrency Note: The WebKit framework is not thread safe. If you call functions or methods in this framework, you must do so exclusively on the main program thread.The WebKit provides a set of core classes to display web content in windows, and by default, implements features such as following l

15、inks clicked by the user. The WebKit greatly simplifies the complicated processof loading webpagesthat is, asynchronously requesting web content from an HTTP server over the network where the response may arrive incrementally, in random order, or partially due to network errors. The WebKit also simp

16、lifies the process of displaying content that can contain various MIME types, and multiple frames each with their own set of scrollbars.You use the WebKit to display web content in a window of your application. Its as simple as creating a view, placing it in a window, and sending a URL load request

17、message. By default, your WebKit application behaves as you would expect without error. The WebKit conveniently creates and manages all the views needed to handle different MIME types. When the user clicks on a link in a page, the WebKit automatically creates the views needed to display the next pag

18、e.However, the WebKit doesnt implement a complete set of web browser features. You can, however, extend the WebKit by implementing custom delegate, view, and model objects. For example, you can implement a delegate to display load status, and the current URL.The WebKit also offers web content editin

19、g. If you enable editing in your WebView, users can edit the web content it displays. You can programmatically control the current selection and control editing behavior using a WebView delegate. You can also modify the Document Object Model directly using an Objective-C API.You can also access Java

20、Script from Objective-C and vice versa.The WebKit Objective-C API is specifically designed for embedding web content in your Cocoa or Carbon applicationsdeveloping web client applications not web server applications or web content. It is also not suitable for implementing non-GUI applications such a

21、s web crawlers. If you are a web content creator or JavaScript programmer, refer to WebKit DOM Programming Topics. 9Important: Currently, this API is available in Objective-C only. A minimal C API is provided for embedding web browser views in Carbon applications. You can use Objective-C in combinat

22、ion with C. The WebKit works with all versions of Mac OS X 10.2 that have Safari 1.0 installed.Organization of This DocumentThe following articles cover key concepts in understanding how the WebKit works: “Why Use the WebKit?” (page 13) describes the purpose of the WebKit and why you might want to u

23、se it in your applications. “Core WebKit Classes” (page 15) describes the core WebKit classes and the object-oriented design that is fundamental to understanding how the WebKit works.The following articles explain how to display web content in views: “Simple Browsing” (page 21) shows how to embed we

24、b content in your application by following a few simple steps. “Multiple Windows” (page 23) shows how to add support for multiple windows, and open windows automatically. “Loading Pages” (page 27) shows how to track the progress of loading frame content. “Loading Resources” (page 31) shows how to tr

25、ack the progress of loading individual resources on a page. “Paging Back and Forward” (page 35) shows how to implement a back-forward list and add Back andForward buttons to your application. “Managing History” (page 37) shows how to maintain a history of all the visited pages, and allow the user to

26、 go to a previously visited page. “Spoofing” (page 59) shows how to use user-agent strings. “Accessing the WebKit From Carbon Applications” (page 61) explains how to embed web content inCarbon applications. “Determining WebKit Availability” (page 63) explains how to determine if the WebKit is availa

27、ble on your system.The following articles explain how to implement web content editing: “Enabling Editing” (page 41) shows how to enable user editing in a WebView. “Saving and Loading Web Content” (page 43) shows how to save and load web content edited by the user. “Modifying the Current Selection” (page 45) shows how to programmatically modify th

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1