40 lines
1.2 KiB
Mathematica
40 lines
1.2 KiB
Mathematica
|
#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");
|
||
|
}
|