Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #import <UIKit/UIKit.h>
  2. @interface news : UIViewController
  3. @property (weak, nonatomic) IBOutlet UIWebView *webpubblicita;
  4. @end
  5.  
  6. #import "news.h"
  7. @interface news ()
  8. @end
  9.  
  10. @implementation news
  11. @synthesize webpubblicita;
  12. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  13. {
  14. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  15. if (self) {
  16. // Custom initialization
  17. }
  18. return self;
  19. }
  20.  
  21. - (void)viewDidLoad
  22. {
  23. [super viewDidLoad];
  24. //indirizzo web da caricare
  25. NSString *indirizzo = @"http://www.mmm.com";
  26. //crea un oggetto URL
  27. NSURL *url = [NSURL URLWithString:indirizzo];
  28. NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
  29. // visualizza la pagina nella UIWebView
  30. [webpubblicita loadRequest:requestObj];
  31. }
  32. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement