Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // OnlineViewController.m
- // IPF3
- //
- // Created by BayDebrecen2 on 2013.05.09..
- // Copyright (c) 2013 BayDebrecen2. All rights reserved.
- //
- #import "OnlineViewController.h"
- @interface OnlineViewController ()
- @end
- @implementation OnlineViewController
- @synthesize live= _live;
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- /*Label*/
- UILabel *onlineLabel =[[UILabel alloc]initWithFrame:CGRectMake(55,-15, 100, 200)];
- onlineLabel.BackgroundColor= [UIColor clearColor];
- onlineLabel.textColor = [UIColor whiteColor];
- onlineLabel.text = @"Online";
- onlineLabel.font = [UIFont systemFontOfSize:11];
- UILabel *onlineLabel2 =[[UILabel alloc]initWithFrame:CGRectMake(60,-15, 100, 200)];
- onlineLabel2.BackgroundColor= [UIColor clearColor];
- onlineLabel2.textColor = [UIColor whiteColor];
- onlineLabel2.text = @"Live";
- onlineLabel2.font = [UIFont systemFontOfSize:11];
- /*Háttér beállítása*/
- UIGraphicsBeginImageContext(self.view.frame.size);
- [[UIImage imageNamed:@"iphoneBackground.jpeg"] drawInRect:self.view.bounds];
- UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- self.view.backgroundColor = [UIColor colorWithPatternImage:image];
- /*Képek betöltése*/
- UIImageView *onlineImage;
- onlineImage = [[UIImageView alloc]initWithFrame:CGRectMake(92, 90, 136, 100)];
- onlineImage.image = [UIImage imageNamed:@"online.png"];
- [onlineImage addSubview:onlineLabel];
- [onlineImage setUserInteractionEnabled:YES];
- [self.view addSubview:onlineImage];
- UITapGestureRecognizer *singleTaP3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(liveTap:)];
- singleTaP3.numberOfTapsRequired = 1;
- singleTaP3.numberOfTouchesRequired = 1;
- _live= [[UIImageView alloc]initWithFrame:CGRectMake(92, 230, 136, 100)];
- _live.image = [UIImage imageNamed:@"online.png"];
- [_live addSubview:onlineLabel2];
- [_live setUserInteractionEnabled:YES];
- [self.view addSubview:_live];
- /*Események*/
- [_live addGestureRecognizer:singleTaP3];
- NSLog(@"23");
- }
- - (void)liveTap:(UITapGestureRecognizer *)recognizer{
- NSLog(@"23");
- /* NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.godlift.info/live.php"]];
- UIWebView *liveLink = [[UIWebView alloc]initWithFrame:self.view.bounds];
- [self.view addSubview:liveLink];
- [liveLink loadRequest:request];*/
- }
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement