-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWV.m
62 lines (51 loc) · 1.69 KB
/
WV.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// WV.m
// Esqueleto DCU
//
// Created by julio.guzman on 29/03/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "WV.h"
@implementation WV
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil dictionary:(NSMutableDictionary *)dictionary1
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
dictionary = dictionary1;
//NSLog(@"DICTIONARY FACETWIT : %@", dictionary);
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
CGRect webFrame = CGRectMake(0.0, 44.0, 320.0, 372.0);
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
[webView setBackgroundColor:[UIColor whiteColor]];
NSString *urlAddress = [[[dictionary objectForKey:@"compartir"] objectAtIndex:0] objectForKey:@"facebook"];
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self.view addSubview:webView];
[webView release];
// Do any additional setup after loading the view from its nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end