代码片段 snippet

 动画

__block UIViewAnimationOptions options = UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionLayoutSubviews | UIViewAnimationOptionBeginFromCurrentState;
    
    IIViewDeckControllerBlock finish = ^(IIViewDeckController *controller, BOOL success) {
        if (!success) {
            if (completed) completed(self, NO);
            return;
        }
        
        [self notifyWillOpenSide:side animated:animated];
        [UIView animateWithDuration:duration delay:0 options:options animations:^{
            [self controllerForSide:side].view.hidden = NO;
            [self setSlidingFrameForOffset:[self ledgeOffsetForSide:side] forOrientation:IIViewDeckOffsetOrientationFromIIViewDeckSide(side)];
            [self centerViewHidden];
        } completion:^(BOOL finished) {
            if (completed) completed(self, YES);
            [self notifyDidOpenSide:side animated:animated];
            UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil);
        }];
    };

参数
va_list argumentList;
        if (firstItem)
        {                                  
            [imageItems addObject: firstItem];
            va_start(argumentList, firstItem);       
            while((eachItem = va_arg(argumentList, SGFocusImageItem *)))
            {
                [imageItems addObject: eachItem];            
            }
            va_end(argumentList);
        }
        

语法:

关联(objc_setAssociatedObject、objc_getAssociatedObject、objc_removeAssociatedObjects)

[Objective-C]__bridge,__bridge_retained和__bridge_transfer的意思,区别与使用


__bridge,__bridge_transfer和__bridge_retained详解

 

Objective-C传递数据小技巧

 


C/ObjC不定参数与哨兵参数

Xcode开发技艺之code snippets(代码片段)

代码片段的备份Xcode中的代码片段默认放在下面的目录中:
~/Library/Developer/Xcode/UserData/CodeSnippets 
我们可以将目录中的代码片段备份,也可以将其直接拷出来放在不同的电脑上使用,因此多台电脑之间的协作也毫无压力。

 一个文科生学编程的书单

在中国,自由职业者包括三类人:第一类是小本生意人,如个体零售店、小吃店、冲印店、装修公司老板(需要资金积累) 
第二类是没有底薪的推销员,如寿险顾问、地产经纪、广告中介、直销人士
第三类是专业人士,如摄影师、专利代理人、律师、会计师、牙科医生、技术顾问、管理顾问、管道工、电工、理发师、艺术家等等(需要技术专长)

 

 

posted @ 2014-10-22 15:35  米粥米  阅读(303)  评论(0编辑  收藏  举报