Guest User

Untitled

a guest
Apr 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #import "Test.h"
  2.  
  3. @implementation Test
  4. - (void) applicationDidFinishLaunching: (id) unused
  5. {
  6.  
  7. //[UIHardware _setStatusBarHeight:0.0f];
  8. [self setStatusBarMode:4 orientation:0 duration:0.0f fenceID:0];
  9. //[self setStatusBarShowsProgress:true];
  10.  
  11.  
  12. UIWindow *window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
  13. [window orderFront: self];
  14. [window makeKey: self];
  15.  
  16. UIView *view = [[UIView alloc] init];
  17.  
  18. [window setContentView:view];
  19.  
  20. AVController *controller = [[AVController alloc] init];
  21. [controller setLayer:[view _layer]];
  22.  
  23. //[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedPlaying:) name:@”AVController_ItemPlaybackDidEnd” object:controller];
  24.  
  25. NSError *error;
  26. AVItem *item = [[AVItem alloc] initWithPath:@"/var/root/how.mp4" error:&error];
  27. [controller setCurrentItem:item preservingRate:NO];
  28. [controller play:nil];
  29. }
  30.  
  31. -(void)movieFinishedPlaying:(NSNotification *)notification
  32. {
  33. [self terminate];
  34. }
  35.  
  36.  
  37.  
  38. @end
Add Comment
Please, Sign In to add comment