自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 AVAudioPlayer音频播放

//  ViewController.h@property (nonatomic)AVAudioPlayer *player;@property (weak, nonatomic) IBOutletUIButton *playButton;//  ViewController.m- (IBAction)playButton:(

2014-11-25 23:40:59 473

原创 ios解档归档2

NSArray *array = [NSArrayarrayWithObjects:@"one",@"two", @"three",nil];    NSString *filePath = [NSHomeDirectory()stringByAppendingPathComponent:@"data"];    //多对象归档    NSMutableDa

2014-11-24 22:34:24 472

原创 iOS解档归档

NSArray *array = [NSArrayarrayWithObjects:@"one",@"two", @"three",nil];    NSString *filePath = [NSHomeDirectory()stringByAppendingPathComponent:@"arry.plist"];    [NSKeyedArchiverarch

2014-11-24 21:56:46 522

原创 ios获取网络图片

//  ViewController.m

2014-11-22 21:47:18 446

原创 NSCalendar获取两个年龄的相差天数

NSCalendar 类的- (NSDateComponents *)components:(NSUInteger)unitFlags fromDate:(NSDate *)startingDate toDate:(NSDate *)resultDate options:(NSUInteger)opts获取startDate与endDate 之间相隔几天NSCalendar *

2014-11-21 14:09:05 727

原创 block回调UIButton

//  BlockBtn.h#import @interface BlockBtn :UIButton@property (nonatomic,copy)void(^block)(void);- (id)initWithFrame:(CGRect)frame;- (void)clickAction;@end

2014-11-18 01:52:18 575

原创 block引用局部变量

//  AppDelegate.m- (int)test:(int (^)(int,int))block{   return block(10,20);}- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary

2014-11-18 00:32:29 558

原创 函数指针实现对象传递消息(回调)

//  AppDelegate.m

2014-11-17 23:55:36 424

原创 ios block 实现函数回调

//A.h#import @interface A : NSObject- (void)delegate:(int (^)(int,int))block;@end//A.

2014-11-17 23:32:39 568

原创 NSCalendar获取未来一年

NSDate *today = [[NSDatealloc] init];    NSCalendar *gregorian = [[NSCalendaralloc]                             initWithCalendarIdentifier:NSGregorianCalendar];    NSDateComponents *of

2014-11-17 20:09:19 495

原创 block实现函数回调

int test(int a)//函数{    printf("test function\n");   return a;}int testFuncPointer(int (*f) (int)){    printf("testFuncPointer fuction\n");    f(30);   return 20;}int mai

2014-11-14 00:23:12 462

原创 函数指针实现函数回调

int test(int a)//函数{    printf("test function\n");   return a;}int testFuncPointer(int (*f) (int)){    printf("testFuncPointer fuction\n");    f(30);   return 20;}int mai

2014-11-14 00:20:58 435

原创 iOS block 用法

int main(int argc,char * argv[]) {       int (^b)(int);//block声明        b= ^(int a){//block创建        return a*a;    };       printf("%d\n",b(10));//block调用}

2014-11-13 23:13:25 495

空空如也

空空如也

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

TA关注的人

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