把当前屏幕作为获取成为图片- (UIImage *)rn_screenshot { UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; U...
分类:
移动开发 时间:
2014-07-27 23:21:19
阅读次数:
216
建工程,建一个类WebViewController 继承于UIViewControllerWebViewController设置为根视图控制器WebViewController遵守UIWebViewDelegate协议以便网页视图加载或停止加载,加载出错时或执行什么方法,发生什么事件WebView....
分类:
Web程序 时间:
2014-07-27 22:09:19
阅读次数:
279
我的系统是w8.1 64,在eclipse上截屏不会出错,到了android studio上结果出错了输出:Unexpected error while obtaining screenshot: java.lang.IllegalStateException: @NotNull method co...
分类:
移动开发 时间:
2014-07-27 10:15:22
阅读次数:
1470
//支持javascriptweb.getSettings().setJavaScriptEnabled(true);// 设置可以支持缩放web.getSettings().setSupportZoom(true);// 设置出现缩放工具web.getSettings().setBuiltInZo...
分类:
移动开发 时间:
2014-07-27 09:49:42
阅读次数:
281
近期工作中,基本一直在用WebView,今天就把它整理下:WebView 顾名思义,就是放一个网页,一个看起来十分简单,可是用起来不是那么简单的控件。首先你肯定要定义,初始化一个webview,事实上网上的样例非常多,我这里就简单的把一些WebView 中可能会用到的的非常重要的属性以及支持全屏播放...
分类:
Web程序 时间:
2014-07-26 14:26:50
阅读次数:
324
把字体文件放到Asset/font目录下Typeface typeFace=Typeface.createFromAsset(mContext.getAssets(),'font/ziti.ttf');TextView.setTypeface(typeFace);@font-face{font-fa...
分类:
Web程序 时间:
2014-07-26 13:44:55
阅读次数:
316
最近在做项目时用到了webview打开指定链接的网页,可已经把webview设置了cookie但始终跳转到登录页面,这明显是cookie没有设置成功导致webview没有将设置好的cookie发送出去……12345CookieSyncManager.createInstance(context);C...
分类:
移动开发 时间:
2014-07-26 00:14:46
阅读次数:
391
首先应该在AndroidManifest.xml把下面这个加上使得具有网络访问权限然后在布局文件上插入WebView main.xml 本地Code 创建 一个JavaScriptInterface的实例final JavaScriptInterface myJ...
分类:
移动开发 时间:
2014-07-25 18:55:52
阅读次数:
267
当我们的应用是横的时候,利用ANE调用原生组件如果处理不当,掉出来的组件会是竖的。那么我么要怎么做才能免去自己手动旋转组件这个破事呢。其实很简单webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 900,700)];//调用原生UI...
分类:
其他好文 时间:
2014-07-25 14:22:11
阅读次数:
205
1,直接调用,结束后不返回自己的应用[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"tel://10086"]];2,使用WebView请求调用系统电话,结束后可以返回自身应用,合法UIWebView*webView=[[UIWebViewalloc]initWithFrame:CGRectZero];[self.viewaddSubview:web..
分类:
移动开发 时间:
2014-07-24 23:44:54
阅读次数:
274