自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 第十二章:表视图常用UI范例——下拉刷新+无限滚动

1.使用UIRefreshControl实现下拉刷新 //声明下拉刷新 self.refreshControl = [[UIRefreshControl alloc] init]; //赋予动作执行 [self.refreshControl addTarget:self action:@selector(refreshedByPullingTable:) forContr

2013-12-30 23:00:32 3572

原创 第十三章:多任务

1.状态恢复系统 功能说明:如果用户输入消息时,中途切换到了另外一个应用,当用户再次回到信息输入界面时,之前输入的消息应该仍然存在。 步骤: 1.在AppDelegate.m 中启动状态保留系统 - (BOOL)application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder { r

2013-12-28 21:00:54 848

原创 多线程之GCD

@interface ViewController () @property (nonatomic,readwrite,weak) IBOutlet UILabel *label; @property (nonatomic,readwrite,assign) NSUInteger count; @property (nonatomic,readwrite,strong) dispatch_que

2013-12-28 20:51:43 1381

原创 多线程 之 NSOperation

//创建一个操作类,必须继承NSOperation, 只需要重写main方法即可(Main方法便是我们需要的异步操作) @interface PrintNumber : NSOperation @end @implementation PrintNumber - (void)main { NSLog(@"1"); } @end //调用异步 @interface ViewCont

2013-12-28 19:59:49 767

原创 IOS 获取CPU 核心数

#include unsigned int countOfCores() { unsigned int ncpu; size_t len = sizeof(ncpu); sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0); return ncpu; }

2013-12-28 19:03:49 3590

转载 property 中的strong 与weak,assign

property 中的strong 与weak strong关键字与retain关似,用了它,引用计数自动+1,用实例更能说明一切   @property (nonatomic, strong) NSString *string1;    @property (nonatomic, strong) NSString *string2;     有这样两个属性,    @synt

2013-12-28 17:58:53 2888

原创 第十一章:位置服务

任何IOS设备都没有配备独立的GPS芯片,实际上都是个辅助GPS芯片,需要通过网络数据计算位置信息(wifi,手机基站等)   下面代码为:位置服务,区域监控 // // ViewController.m // Location_Demo // // Created by Eric on 13-12-7. // Copyright (c) 2013年 Eric. All rights

2013-12-07 12:08:19 2112 1

空空如也

空空如也

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

TA关注的人

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