forked from cory/tildefriends
Forgotten file.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4516 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
05a7e941cf
commit
87e769786a
39
src/ios.m
Normal file
39
src/ios.m
Normal file
@ -0,0 +1,39 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <WebKit/WKWebView.h>
|
||||
#import <WebKit/WKWebViewConfiguration.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
@property(strong, nonatomic) WKWebView* web_view;
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init];
|
||||
self.web_view = [[WKWebView alloc] initWithFrame:self.view.frame configuration:configuration];
|
||||
[self.web_view loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.tildefriends.net/"]]];
|
||||
[self.view addSubview:self.web_view];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface AppDelegate : UIResponder<UIApplicationDelegate>
|
||||
@property(strong, nonatomic) UIWindow* window;
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
|
||||
{
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
ViewController* view_controller = [[ViewController alloc] init];
|
||||
self.window.rootViewController = view_controller;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
return UIApplicationMain(argc, argv, nil, @"AppDelegate");
|
||||
}
|
Loading…
Reference in New Issue
Block a user