手机的内外存储卡介绍可以参考博客:http://blog.sina.com.cn/s/blog_5da93c8f0102vcam.html
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super....
分类:
移动开发 时间:
2015-04-13 19:06:54
阅读次数:
178
解决方案:
在出现这种情况的View 中 重写 onRestoreInstanceState方法
详细代码: protected void onRestoreInstanceState(Parcelable state) {
try {
super.onRestoreInstanceState(state);
} catch (Exception e) {
}
...
分类:
移动开发 时间:
2015-04-13 18:54:19
阅读次数:
269
Person.m
#import "Person.h"
@implementation Person
// 编码
- (id)initWithCoder:(NSCoder *)aDecoder{
self = [super
init];
if (self) {
self.name = [[aDecoder
deco...
分类:
编程语言 时间:
2015-04-13 16:46:29
阅读次数:
281
今天让我们来看一看ios线程中是怎么样通信的。
#import "ViewController.h"
@interface ViewController ()
{
UIImageView *_image;
}
@end
@implementation ViewController
- (void)viewDidLoad {
[super...
分类:
移动开发 时间:
2015-04-13 09:40:43
阅读次数:
133
Java静态代码块、构造代码块、构造方法的执行顺序静态代码优先于非静态的代码,是因为被static修饰的成员都是类成员,会随着JVM加载类的时候加载而执行,而没有被static修饰的成员也被称为实例成员,需要创建对象才会随之加载到堆内存。所以静态的会优先非静态的。
执行构造器(构造方法)的时候,在执行方法体之前存在隐式三步:
1,super语句,可能出现以下三种情况:
1)构造方法体的第一行是...
分类:
编程语言 时间:
2015-04-13 00:27:02
阅读次数:
142
我决定倒着写了。。。7.给collectioncell加边框 或者给任何view加边框的方法- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // 初始...
分类:
移动开发 时间:
2015-04-12 19:07:45
阅读次数:
132
图片上传这个功能我们经常用到,有时候我们需要一次选择多张图片。那么可以使用以下方法:首先导入头文件#import "WSPhotoView.h"然后再ViewDidLoad方法添加如下代码:- (void)viewDidLoad { [super viewDidLoad]; WSPho...
分类:
移动开发 时间:
2015-04-12 14:43:58
阅读次数:
1097
super+ctrl+D 最小化所有窗口Alt + F1 打开启动器菜单Alt + F2 运行命令Shift + F10 右键Ctrl + Alt + Backspace 重启会话以从崩溃中恢复Alt + F7 移动窗口 (注: 在窗口最大化的状态下无效)Alt + F8 改变窗口大小 (注: 在窗...
分类:
系统相关 时间:
2015-04-12 14:35:31
阅读次数:
132
Python类继承和多态 在OOP(Object Oriented Programming)程序设计中,当我们定义一个class的时候,可以从某个现有的class 继承,新的class称为子类(Subclass),而被继承的class称为基类、父类或超类(Base class、Super clas....
分类:
编程语言 时间:
2015-04-12 10:34:58
阅读次数:
150
1 Android手机目前常见的分辨率1.1 手机常见分辨率:4:3VGA 640*480 (Video Graphics Array)QVGA 320*240 (Quarter VGA)HVGA 480*320 (Half-size VGA)SVGA 800*600 (Super VGA)5:3W...
分类:
移动开发 时间:
2015-04-12 10:34:05
阅读次数:
162