zoukankan      html  css  js  c++  java
  • iPhone 浏览器开发之关键 UIWebView

      NSLog(@"loading");

      UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];

      contentView.backgroundColor = [UIColor blueColor];

      NSLog(@"self view");

      // view orientation rotation

      contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);

      self.view = contentView;

      //设置属性

      //自动调整视图大小

      self.view.autoresizesSubviews = NO;

      //

      //创建一个层用来放webview

      CGRect webFrame = [[UIScreen mainScreen] applicationFrame];

      webFrame.origin.y -= 20.0;

      //

      UIWebView *aWebView = [[UIWebView alloc] initWithFrame:webFrame];

      self.webView = aWebView;

      //缩放

      aWebView.scalesPageToFit = NO;

      //自动调整大小

      aWebView.autoresizesSubviews = NO;

      aWebView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);

      //[aWebView setDelegate:self];

      NSURL *aURL = [NSURL URLWithString:@"http://192.168.1.120/emenu/?tp=tp4"];

      NSURLRequest *aRequest = [NSURLRequest requestWithURL:aURL];

      //发送请求

      [aWebView loadRequest:aRequest];

      //把webview添加到内容视图

      [contentView addSubview:webView];

      [aWebView release];

      [contentView release];

  • 相关阅读:
    一步一步学数据结构之(动态申请二维数组)
    运维自动化
    oracle查看登录到oracle服务器的客户端ip
    权限
    windows下使用SQLPLUS制作BAT执行SQL文件
    rsyslog传输type
    C经典实例
    mysql导出数据库数据及表结构
    解决oracle11g无法导出空表问题
    opennebula onenebula
  • 原文地址:https://www.cnblogs.com/top5/p/2116331.html
Copyright © 2011-2022 走看看