Advertisement
Guest User

Untitled

a guest
May 14th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
DOT 1.24 KB | None | 0 0
  1. package org.xmlvm.demo.ihelloworld.fullscreen;
  2.  
  3. import org.xmlvm.iphone.*;
  4.  
  5. public class HelloWorld extends UIApplication {
  6.  
  7.     public void applicationDidFinishLaunching(UIApplication app) {
  8.         this.setStatusBarHidden(true);
  9.         this.setStatusBarOrientation(UIInterfaceOrientation.LandscapeRight);
  10.         UIScreen screen = UIScreen.mainScreen();
  11.         CGRect rect = screen.getApplicationFrame();
  12.         float t = rect.size.height;
  13.         rect.size.height = rect.size.width;
  14.         rect.size.width = t;
  15.         UIWindow window = new UIWindow(rect);
  16.         CGAffineTransform rotate = CGAffineTransform.makeRotation((float) ((Math.PI / 180) * -90));
  17.         CGAffineTransform translate = CGAffineTransform.translate(rotate, -80, -80);
  18.         window.setTransform(translate);
  19.  
  20.         rect.origin.x = rect.origin.y = 0;
  21.         UIView mainView = new UIView(rect);
  22.         window.addSubview(mainView);
  23.  
  24.         UILabel title = new UILabel(rect);
  25.         title.setText("Hello World!");
  26.         title.setTextAlignment(UITextAlignment.Center);
  27.         mainView.addSubview(title);
  28.  
  29.         window.makeKeyAndVisible();
  30.     }
  31.  
  32.     public static void main(String[] args) {
  33.         UIApplication.main(args, HelloWorld.class);
  34.     }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement