Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <UIKit/UIKit.h>
- @interface news : UIViewController
- @property (weak, nonatomic) IBOutlet UIWebView *webpubblicita;
- @end
- #import "news.h"
- @interface news ()
- @end
- @implementation news
- @synthesize webpubblicita;
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- //indirizzo web da caricare
- NSString *indirizzo = @"http://www.mmm.com";
- //crea un oggetto URL
- NSURL *url = [NSURL URLWithString:indirizzo];
- NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
- // visualizza la pagina nella UIWebView
- [webpubblicita loadRequest:requestObj];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement