I am trying to load a series of URLs based on the contents of my database, i.e. http://www.whatever.com , but when I run the application in the simulator nothing appears, my code reads as follows
.h file (import exception exception)
@interface FSFourthScreenViewController : UIViewController
{
NSString * urlString;
UIWebView * FSWebView;
}
@property (nonatomic, retain) NSString * urlString;
@property (nonatomic, retain) IBOutlet UIWebView * FSWebView;
@end
.x file import exceptions.
@interface FSFourthScreenViewController ()
@end
@implementation FSFourthScreenViewController
@synthesize FSWebView, urlString;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"backgroundimage.png"]];
NSURL * url = [NSURL URLWithString:urlString];
NSURLRequest * requestObj = [NSURLRequest requestWithURL:url];
[FSWebView loadRequest:requestObj];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
@end
I connected the webview correctly and assigned the correct field in the database. I also cleared xcode and the simulator, but still no joy ... any ideas are welcome?
source
share