Advertisement
Guest User

Untitled

a guest
May 12th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  OnlineViewController.m
  3. //  IPF3
  4. //
  5. //  Created by BayDebrecen2 on 2013.05.09..
  6. //  Copyright (c) 2013 BayDebrecen2. All rights reserved.
  7. //
  8.  
  9. #import "OnlineViewController.h"
  10.  
  11. @interface OnlineViewController ()
  12.  
  13. @end
  14. @implementation OnlineViewController
  15. @synthesize live= _live;
  16.  
  17. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  18. {
  19.     self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  20.     if (self) {
  21.         // Custom initialization
  22.     }
  23.     return self;
  24. }
  25.  
  26. - (void)viewDidLoad
  27. {
  28.      [super viewDidLoad];
  29.      
  30.     /*Label*/
  31.     UILabel *onlineLabel =[[UILabel alloc]initWithFrame:CGRectMake(55,-15, 100, 200)];
  32.     onlineLabel.BackgroundColor= [UIColor clearColor];
  33.     onlineLabel.textColor = [UIColor whiteColor];
  34.     onlineLabel.text = @"Online";
  35.     onlineLabel.font = [UIFont systemFontOfSize:11];
  36.    
  37.     UILabel *onlineLabel2 =[[UILabel alloc]initWithFrame:CGRectMake(60,-15, 100, 200)];
  38.     onlineLabel2.BackgroundColor= [UIColor clearColor];
  39.     onlineLabel2.textColor = [UIColor whiteColor];
  40.     onlineLabel2.text = @"Live";
  41.     onlineLabel2.font = [UIFont systemFontOfSize:11];
  42.    
  43.     /*Háttér beállítása*/
  44.     UIGraphicsBeginImageContext(self.view.frame.size);
  45.     [[UIImage imageNamed:@"iphoneBackground.jpeg"] drawInRect:self.view.bounds];
  46.     UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  47.     UIGraphicsEndImageContext();
  48.     self.view.backgroundColor = [UIColor colorWithPatternImage:image];
  49.    
  50.    
  51.     /*Képek betöltése*/
  52.     UIImageView *onlineImage;
  53.     onlineImage = [[UIImageView alloc]initWithFrame:CGRectMake(92, 90, 136, 100)];
  54.     onlineImage.image = [UIImage imageNamed:@"online.png"];
  55.     [onlineImage addSubview:onlineLabel];
  56.     [onlineImage setUserInteractionEnabled:YES];
  57.     [self.view addSubview:onlineImage];
  58.    
  59.     UITapGestureRecognizer *singleTaP3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(liveTap:)];
  60.     singleTaP3.numberOfTapsRequired = 1;
  61.     singleTaP3.numberOfTouchesRequired = 1;
  62.    
  63.     _live= [[UIImageView alloc]initWithFrame:CGRectMake(92, 230, 136, 100)];
  64.     _live.image = [UIImage imageNamed:@"online.png"];
  65.     [_live addSubview:onlineLabel2];
  66.     [_live setUserInteractionEnabled:YES];
  67.  
  68.     [self.view addSubview:_live];
  69.    
  70.     /*Események*/
  71.    
  72.    [_live addGestureRecognizer:singleTaP3];
  73.      NSLog(@"23");
  74.    
  75. }
  76.  
  77.  
  78. - (void)liveTap:(UITapGestureRecognizer *)recognizer{
  79.       NSLog(@"23");
  80.   /*  NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.godlift.info/live.php"]];
  81.     UIWebView *liveLink = [[UIWebView alloc]initWithFrame:self.view.bounds];
  82.     [self.view addSubview:liveLink];
  83.     [liveLink loadRequest:request];*/
  84.    
  85. }
  86.  
  87. - (void)didReceiveMemoryWarning
  88. {
  89.     [super didReceiveMemoryWarning];
  90.     // Dispose of any resources that can be recreated.
  91. }
  92.  
  93. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement