Uiwebviewでローカルにあるhtmlを means する&ios6からtextalignmentで Specifies able が slew more になった

Source: Internet
Author: User

"Objective-c" uiwebviewでローカルにあるhtmlを means able


Xcode in にhtmlを 前転して開脚座り, そのhtmlをwebviewで represents able method ですので.

Uiwebviewの of early stage
UIWebView *webview = [[UIWebView alloc] initWithFrame:self.view.bounds];
Htmlのパスの obtained (present はsample.html)
NSString *path = [[NSBundle mainbundle] pathforresource:@ "sample" oftype:@ "html"];
ファイルの reading cups komagome cups
[WebView loadrequest:[nsurlrequest Requestwithurl:[nsurl Fileurlwithpath:path]];
[Self.view Addsubview:webview];


Ios6からtextalignmentで specify able が slew more になった

Previously (iOS5 or less)
Previously まではこんな sense じです.

(uitextview*) textview.textalignment = uitextalignmentcenter; Specify able も below のものでした.
Uitextalignmentcenter
Uitextalignmentright
Uitextalignmentleft

Now (IOS6)
Now (iOS6) はこんな sense じです.
(uitextview*) textview.textalignment = nstextalignmentcenter; Specify able も the following のものを use able necessary があります.
Nstextalignmentcenter
Nstextalignmentright
Nstextalignmentleft

Previously のものを specified するとエラーが out るので note ですので.

Uiwebviewでローカルにあるhtmlを means する&ios6からtextalignmentで Specifies able が slew more になった

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.