开发者

How to calculate size of HTML text to be drawn

开发者 https://www.devze.com 2022-12-30 21:20 出处:网络
How can I create pages and display them in UIWebView from a HTML file? How can I calculate and draw the amount of text from HT开发者_C百科ML file. Create a NSURLRequest and load it into the view. The

How can I create pages and display them in UIWebView from a HTML file? How can I calculate and draw the amount of text from HT开发者_C百科ML file.


Create a NSURLRequest and load it into the view. The view takes care of displaying the html automatically. Note that you can get URL can be local, on a website, on a server as php, anything. I don't understand the second question. Please reframe it. Thanks.

// Request the contents of the abtWebView
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.whatever.com/aDirectory/stuff.html"]];

// Load the webview
[self.theWebView loadRequest:request];
0

精彩评论

暂无评论...
验证码 换一张
取 消