小编Zee*_*eem的帖子

IOS UIWebView定位问题

我是iOS新手,只需创建一个小型本机应用程序,加载一个URL,该URL托管在IIS上并在Jquery移动设备上制作.问题是当我改变方向时,它是从右侧剪切,而同样的东西在所有Android设备上正常工作.请帮帮我

这是我的代码

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    UIWebView *webView=[[UIWebView alloc]initWithFrame:CGRectMake(0.0, 0.0,768,1024)];


    NSString *httpSource=@"http://www.mydomain.com";
    NSURL *fullUrl=[NSURL URLWithString:httpSource];
    NSURLRequest *httpRequest=[NSURLRequest requestWithURL:fullUrl];
    webView.delegate=self;
    [webView loadRequest:httpRequest];
    [self.view addSubview:webView];
    // Do any additional setup after loading the view, typically from a nib.
}

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

@end
Run Code Online (Sandbox Code Playgroud)

cocoa-touch objective-c uiwebview ios6

2
推荐指数
1
解决办法
2473
查看次数

标签 统计

cocoa-touch ×1

ios6 ×1

objective-c ×1

uiwebview ×1