自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 iOS PhotoKit

PhotoKit的基本构成:PHAsset:代表照片库中的一个资源,和ALAsset类似, 通过PHAsset可以获取和保存资源。PHFetchOptions:获取资源时的参数,可以传nil,即使用系统默认值。PHAssetCollection:PHCollection的子类,表示一个相册或者一个时刻,或者是一个智能相册。PHFetchResult:表示一系列的资源结果集合,也可以是相册的集合,从P

2016-12-26 11:46:28 613

原创 iOS block小记

block就像是封装了一段代码,设置其输入源和内部的逻辑运算,当调用的时候才执行里面的代码。

2016-12-20 14:22:30 384

原创 cocos2d——动作

注:设置成员变量 private: cocos2d::Sprite* sprite;1.移动auto moveto =MoveTo::create(2, Vec2(40, 80));sprite->runAction(moveto);2.动作组(Sequence)auto hideAction = Hide::create();auto moveTo = MoveTo::create

2016-12-15 14:19:16 451

原创 cocos2d杂记

1.除了layer的setPosition是用的左下角,其他是指的中心点

2016-12-15 11:49:21 318

原创 cocos2d学习笔记——基础控件

通用的高度 auto visibleSize =Director::getInstance()->getVisibleSize(); Vec2 origin =Director::getInstance()->getVisibleOrigin(); 1.按钮auto startItem =MenuItemFont::create("Start", CC_CALLBACK_1(NextScene

2016-12-15 10:23:11 476

原创 ios 如果获取cell上控件相对于屏幕的坐标

UIWindow * window=[[[UIApplication sharedApplication] delegate] window];CGRect frame=[self convertRect: self.bounds toView:window];textfield不被键盘遮挡UIWindow * window=[[[UIApplication sharedApplication]

2016-12-13 14:29:53 4034

原创 iOS CGImageRef

图片截取 UIImageView * imgView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 100, 420, 375)]; [self.view addSubview:imgView]; UIImage * img =[UIImage imageNamed:@"zc.jpg"]; CGImageRef imgR

2016-12-09 17:12:35 611

原创 UIKit Dynamics

1.重力效果 UIImageView * lview =[[UIImageView alloc]initWithFrame:CGRectMake(20, 100, 40, 40)]; lview.image =[UIImage imageNamed:@"zc.jpg"]; [self.view addSubview:lview]; animator = [[UIDynam

2016-12-08 16:18:39 287

原创 alloc init问题

for (int i =0; i<4; i++) { btn =[[UIButton alloc]initWithFrame:CGRectMake(40+60*i, 100, 40, 40)]; btn.backgroundColor =[UIColor redColor]; btn.tag =100+i; [btn addTarget

2016-12-03 13:37:04 328

转载 iOS获取键盘高度

- (void)viewDidLoad{ [super viewDidLoad]; //增加监听,当键盘出现或改变时收出消息 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWil

2016-12-01 09:20:34 820

空空如也

空空如也

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

TA关注的人

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