Posted By


takezou621 on 02/27/11

Tagged


Statistics


Viewed 518 times
Favorited by 0 user(s)

Related snippets


ApplicationDelegateオブジェクトを取得する


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. -(UIWindow*) delegateWindow{
  2.  
  3. UIWindow *result = nil;
  4.  
  5. Project1AppDelegate *delegate =
  6. (Project1AppDelegate*)[UIApplication sharedApplication].delegate;
  7.  
  8. if(delegate != nil){
  9. result = [delegate window];
  10. }
  11.  
  12. return result;
  13. }
  14.  
  15. -(void)logMainWindowRect{
  16.  
  17. UIWindow *mainWindow = [self delegateWindow];
  18. if(mainWindow != nil){
  19. NSLog(@"Window Rect = %@",NSStringFromCGRect(MainWindow.frame));
  20. }
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.