iOS中用UIWebView的loadHTMLString后图片和文字失调,图片过大,超过屏幕,文字太小;或者图片太小,文字太大,总之就是不协调。我们的需求是让图片的大小跟着屏幕的变化而变化,就是动态的去适应屏幕;那么文字的字体就是我们自己可以控制,可大可小。要想达到这样的效果,我们要在用loadH...
分类:
移动开发 时间:
2016-01-25 12:55:21
阅读次数:
250
清除data,清除cache,其实在Android原生Setting里面有这个功能的。需求是把这个功能做到自己的App里面,并计算出cache和data的size。所以参考了一下Setting的源码。看如何实现该功能:首先需要写两个aidl去调用系统的清除以及获取size功能:IPackageSta...
分类:
移动开发 时间:
2016-01-25 12:57:18
阅读次数:
255
# Built application files*.apk*.ap_# files for the dex VM*.dex# Java class files*.class*/R.java# generated filesbin/gen/# Local configuration file (sd...
分类:
移动开发 时间:
2016-01-25 12:53:08
阅读次数:
212
1. 问题的引出如果html5要适应各种分辨率的移动设备,可以使用rem这样的尺寸单位,针对各个分辨率范围在html上设置font-size的代码:html{font-size:10px}@media screen and (min-width:321px) and (max-width:375px...
分类:
移动开发 时间:
2016-01-25 12:51:47
阅读次数:
10157
http://www.cnblogs.com/sell/archive/2013/02/16/2913341.html1. Terms and conditions(法律与条款)1.1As a developer of applications for the App Store you are b...
分类:
移动开发 时间:
2016-01-25 12:47:02
阅读次数:
628
前言几乎每个app都会有登录注册的功能,可以看看笔者开发的『南方周末新闻阅读器』,登录、手机注册、忘记密码这些入口,这些功能在app中要如何来实现呢?这个模块看似很简单,但要做好就需要考虑很多细节,比如对用户的输入的容错,操作的提示文案的设定,登录成功保存用户信息等等。业务流程图业务逻辑描述上一节的流程图已经很清晰的展现了登录注册的流程,这里继续用文字说明一下:
1. 点击进入个人中心或者需要用户...
分类:
移动开发 时间:
2016-01-25 11:33:25
阅读次数:
338
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{ [self.navigationController.navigationBar setBackgroundImage:[self imageWithBgColor:[UIColor col...
分类:
移动开发 时间:
2016-01-25 11:33:14
阅读次数:
251
定位服务是移动设备上最常用的服务之一,在android系统中同样提供了这样的核心服务。其API主要在android.location包下,具体如下: 在上面截图中我们可以看出android平台中涉及的定位服务的API,现针对常用的几个类与接口做简单描述。1、LocationManager:核...
分类:
移动开发 时间:
2016-01-25 11:29:03
阅读次数:
408
1.解析JSon数据格式出错的问题unescaped control character around character XXXX和 The data couldn’t be read because it isn’t in the correct format.Error的错误码为3840出现这...
分类:
移动开发 时间:
2016-01-25 11:29:28
阅读次数:
190
EidtText和textview中内容过长的话自动换行,使用android:ellipsize与android:singleine可以解决,使只有一行。EditText不支持marquee用法如下:在xml中android:ellipsize = "end" 省略号在结尾android:ell.....
分类:
移动开发 时间:
2016-01-25 11:27:07
阅读次数:
180
参考:http://www.cocoachina.com/industry/20140818/9401.htmlhttp://blog.csdn.net/zhaoxy_thu/article/details/17277527iOS 9 安装企业包 没有了信任按钮 需要手动设置为信任http://ww...
分类:
移动开发 时间:
2016-01-25 11:22:11
阅读次数:
136
package cn.iris.matrixapi;import android.app.Activity;import android.graphics.Matrix;import android.graphics.PointF;import android.os.Bundle;import an...
分类:
移动开发 时间:
2016-01-25 11:14:37
阅读次数:
230
#import @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window;@end#import "AppDelegate.h"#import "RootViewController.h"@...
分类:
移动开发 时间:
2016-01-25 11:15:00
阅读次数:
167
没有存储任何内存地址的指针就称为空指针(NULL指针)野指针是指向"垃圾"内存(不可用内存)的指针。野指针是非常危险的比如说 定义了一个Person 的类,Person类有一个 - (void)setName方法Person * per = [[Person alloc]init];[per set...
分类:
移动开发 时间:
2016-01-25 11:15:28
阅读次数:
160
C# url 用 浏览器打开、C#获取浏览器的url static void Main(string[] args){ string file = @"C:\Users\Hero\Desktop\SiteWhitelist.tsv"; string[] l...
分类:
移动开发 时间:
2016-01-25 11:14:24
阅读次数:
201
转发:http://segmentfault.com/a/1190000003498111“新概念英语”、“可可英语”、“亚马逊的audible有声书”、“扇贝听力”是我目前所知道的实现英文语音和文本同步的应用。“同步”包括两方面:被读到的单词(或句子)可以高亮显示,同步显示文本;选中某个单词(或句...
分类:
移动开发 时间:
2016-01-25 11:10:06
阅读次数:
373
本文翻译自苹果官方文档《iOS Human Interface Guidelines》——Accessing User Data,讲解使用用户私人数据时的相关指南...
分类:
移动开发 时间:
2016-01-25 10:04:56
阅读次数:
159