自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 View的touch事件

[cpp] view plaincopyprint?//轻击:    //需要在你的ViewController里重写几个方法:    //开始触摸的方法    - (void)touchesBegan:(NSSet *)touches                withEvent:(UIEvent *)event     

2015-09-15 14:39:33 178

原创 NSKeyedArchiver

基本的数据类型如NSString、NSDictionary、NSArray、NSData、NSNumber等可以用属性列表的方法持久化到.plist 文件中,但如果是一些自定义的类的话,属性列表的方法就不管用了。archiver 方法可以做到。编码如下:     首先新建一个person类,定义它的三个属性,如下://// person.h// 数据持久化之arch

2015-08-07 19:21:08 190

原创 EGOImageLoader图片加载

[[EGOImageLoader sharedImageLoader] imageForURL:aURL shouldLoadWithObserver:self]1.在这个方法中首先会从缓存中查找,如果已经存在则直接返回 UIImage* anImage = [[EGOCachecurrentCache] imageForKey:keyForURL(aURL,nil)];

2015-08-07 17:16:13 241

原创 ASI请求数据

ASI请求数据有get请求和post请求1 首先导入类库2 引入包ASIHTTPRequest3 在 .m文件中UIButton *getButton = [UIButton buttonWithType:UIButtonTypeCustom];    [getButton setTitle:@"ASI get请求" forState:UIControlStateNorma

2015-08-07 17:06:44 242

原创 KVC与KCO实例

- (void)viewDidLoad {    [super viewDidLoad];    self.view.backgroundColor = [UIColor greenColor];        //KVC:key value coding 键值编码    //间接给model属性赋值,提高代码效率            //KVO:设计模式 (观察

2015-08-07 09:28:36 346

转载 自定义大头针

-(MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id )annotation {          MKAnnotationView *newAnnotation=[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdent

2015-08-06 17:45:29 148

原创 短信验证

1 首先新建项目导入MessageUI.framework包2引入头文件#import 3 在.m文件中首先新建一个按钮UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(100, 100, 100, 50)];    [button setTitle:@"发送" forState:UIContr

2015-08-06 17:33:49 219

原创 swift基础

// Playground - noun: a place where people can playimport UIKitvar str = "Hello, playground"/*******1不用;和()*2 没有了main函数*******/// 一 常量和变量//let用来声明一个常量let a = 23//var声明变量var b

2015-08-05 15:33:42 149

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除