Webkit

Webkit. Webkit is predominantly used in most apps, and is used for displaying webpages within your own app, without leaving the app to go to Safari to view a site.

WebKit includes UIWebView, which is used for displaying web content. It can take in HTML, MIME + data, or a URL.

UIWebView
//Load data
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL; - (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL; - (void)loadRequest:(NSURLRequest *)request;
//Common action methods
- (void)reload; - (void)stopLoading; - (void)goBack; - (void)goForward;
//Useful properties
@property BOOL scalesPageToFit; @property BOOL detectsPhoneNumbers;



It is very simple to use a UIWebView. We first create the object and we can start loading the data. There are several action methods you might want to take note, such as reload, stopLoading, etc. There are also properties which are useful such as scalesPageToFit, which scales it on the first load, and detectsPhoneNumbers, which detects all phone numbers in the page to make them tappable. And when you tap on these numbers, your iPhone automatically.

UIWebViewDelegate
There is also a delegate which you may wish to implement, and it brings about many interesting methods such as failing to load, link clicked, form submitted, and many more.