Print and show "Hello World!"

Property definitions

ios :: hello_ios $ AppDelegate :: hello_world
	# Print and show "Hello World!"
	private fun hello_world: Bool in "ObjC" `{

		// Print to the console
		NSLog(@"Hello World!");

		// Display "Hello world!" on the screen
		CGRect frame = [[UIScreen mainScreen] bounds];
		self.window = [[UIWindow alloc] initWithFrame: frame];
		self.window.backgroundColor = [UIColor whiteColor];

		UILabel *label = [[UILabel alloc] init];
		label.text = @"Hello World!";
		label.center = CGPointMake(100, 100);
		[label sizeToFit];

		// As with `self.window` we must set a `rootViewController`
		self.window.rootViewController = [[UIViewController alloc]initWithNibName:nil bundle:nil];
		self.window.rootViewController.view = label;

		[self.window addSubview: label];
		[self.window makeKeyAndVisible];

		return YES;
	`}
lib/ios/examples/hello_ios.nit:34,2--58,3