• 项目中启动另外的一个app


        NSMutableString *webViewContent = [[NSMutableStringalloc] init];

        [webViewContent appendString:@"<html xmlns="http://www.w3.org/1999/xhtml">"];

        [webViewContent appendString:@"<head>"];

        [webViewContent appendString:@"<meta id="viewport" name="viewport" content="width=280; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />"];

        [webViewContent appendString:@" <style type="text/css">"];

        [webViewContent appendString:@" body"];

        [webViewContent appendString:@" {"];

        [webViewContent appendString:@" margin: 0px;"];

        [webViewContent appendString:@" padding: 0px;"];

        [webViewContent appendString:@" }"];

        [webViewContent appendString:@" </style>"];

        [webViewContent appendString:@" <title>title</title>"];

        [webViewContent appendString:@" </head>"];

        [webViewContent appendString:@" <body>"];

        [webViewContent appendString:@" <script>"];

        [webViewContent appendString:@" window.location = "vlife963656852:";"];

        [webViewContent appendString:@" setTimeout( function(){ window.location="https://itunes.apple.com/us/app/v-sheng-huo/id605292920?ls=1&mt=8"; } , 1500);"];

        [webViewContent appendString:@" </script>"];

        [webViewContent appendString:@" </body>"];

        [webViewContent appendString:@" </html>"];

        

        UIWebView *webView = [[UIWebViewalloc] initWithFrame:CGRectMake(0, 0, 1, 1)];

        webView.delegate = self;

        [webView loadHTMLString:webViewContent baseURL:[NSURLURLWithString:@""]];

        [self.view addSubview:webView];

        [webView release];

        

        [webViewContent release];

  • 相关阅读:
    二分图的判定 (图)
    并查集(模板)
    数独 (dfs)
    Map <STL>
    Set <STL>
    二叉搜索树的实现
    Find a way (BFS)
    根据输入的变量,执行相应的计算公式并返回结果
    检测字符串当中x与o的数目是否相等
    根据给定的数字和字符串,生成循环指定次数的字符串
  • 原文地址:https://www.cnblogs.com/iphone520/p/3352811.html
Copyright © 2020-2023  润新知