- (id)init:(NSString*)url{
self = [super
init];
if (self) {
// Custom initialization
self.strurl = url;
}
return self;
}
- (void)viewDidLoad
{
[super
viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.mywebview = [[UIWebView
alloc]
initWithFrame:CGRectMake(0, -2,
self.view.bounds.size.width,
self.view.bounds.size.height-44)];
self.mywebview.delegate =
self;
self.mywebview.scalesPageToFit =
YES;
self.mywebview.autoresizingMask =
UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin |
UIViewAutoresizingFlexibleTopMargin;
self.mywebview.contentMode =
UIViewContentModeScaleAspectFit;
NSURL* url = [NSURL
URLWithString: self.strurl];
[self.mywebview
loadRequest:[NSURLRequest
requestWithURL:url]];
[self.view
addSubview:self.mywebview];
}