IOS local loading HTML landing page

Source: Internet
Author: User
Tags uikit

Code for HTML

<! DOCTYPE html>

Code for CSS

Body{Background-color:#f2f2f2;}#content{Margin-top:100px;/*background:red;*/text-align:Center;}#content. Panel{Display:Inline-block;Background-color: White;Border:1px solid #ddd;Border-radius:5px;padding:20px;}#content. Panel. Group{}/*s input Box*/#content. Panel. Group Input{Display:Block;width:250px;Height:33px;Padding-left:7px;font-size:15px;Border:2px solid #ddd;}/*Pseudo class*/#content. Panel. Group Input:focus{Outline:None;Border-color:#CC865E;}#content. Panel. Group Label{Display:Block;text-align: Left;Height:30px;Line-height:30px;font-size:20px;}#content. Login{Margin-top:20px;}/*Login*/#content. Login button{width:250px;Background-color:#CC865E;}#content. Login Button:hover{Background-color: White;Color:#CC865E;Border:1px solid #CC865E;cursor:Pointer;}#content Button{Height:33px;Border:0px;Color: White;font-size:18px;Border-radius:3px;}#content. reg{Margin-top:20px;}/*Register*/#content. reg Button{width:250px;Background-color:#466BAF;}#content. reg Button:hover{Background-color: White;Color:#466BAF;Border:1px solid #466BAF;cursor:Pointer;}

Code for IOS

#import <UIKit/UIKit.h>@interface appdelegate:uiresponder <UIApplicationDelegate>  *window; @end
#import "AppDelegate.h"#import "RootViewController.h"@interfaceappdelegate ()@end@implementationappdelegate-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions {Self.window=[[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]; //Override point for customization after application launch.Self.window.backgroundColor =[Uicolor Whitecolor]; Self.window.rootViewController=[[Rootviewcontroller alloc] init];    [Self.window makekeyandvisible]; returnYES;}@end
#import <UIKit/UIKit.h>@interface  rootviewcontroller:uiviewcontroller@end 
#import "RootViewController.h"@interfaceRootviewcontroller () @property (nonatomic, strong) UIWebView*WebView;@end@implementationRootviewcontroller- (void) viewdidload {[Super viewdidload]; //HTML in the local path (/users/apple/webstormprojects/loginpage/login.html)Nsurl *url = [Nsurl Fileurlwithpath:@"/users/apple/webstormprojects/loginpage/login.html"]; Nsurlrequest*request =[Nsurlrequest Requestwithurl:url]; UIWebView*awebview =[[UIWebView alloc] initwithframe:[[uiscreen mainscreen] bounds]; Self.webview=Awebview;    [Self.webview Loadrequest:request]; [Self.view AddSubview:self.webView];}@end

IOS local loading HTML landing page

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.