在所有设备的视图中正确缩放webview

时间:2015-02-15 17:51:40

标签: ios objective-c iphone webview

我有以下设置 enter image description here

ViewController.m类只是一段简单的代码:

import" ViewController.h"

@interface ViewController ()
@property (strong, nonatomic) IBOutlet UIWebView *viewWeb;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    NSString *fullURL = @"https://google.com";
    NSURL *url = [NSURL URLWithString:fullURL];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [_viewWeb loadRequest:requestObj];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

输出以这种方式出现: enter image description here

您可以看到内容已被剪裁。你能让我知道我错过了什么吗? 我只是想在所有设备(iPhone / iPad)中正确缩放webview(以覆盖整个屏幕)

0 个答案:

没有答案