forked from cory/tildefriends
Cory McWilliams
87e769786a
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4516 ed5197a5-7fde-0310-b194-c3ffbd925b24
40 lines
1.2 KiB
Objective-C
40 lines
1.2 KiB
Objective-C
#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");
|
|
}
|