随记

CSDN 全:  http://www.cocoachina.com/ask/app/webroot/upload/201401/20140117095310_35469.png


iOS 打开文档:http://www.cocoachina.com/ios/20130515/6212.html   QLPreviewController  http://blog.csdn.net/andyweike/article/details/6049564    http://my.oschina.net/u/1418722/blog/233132   http://www.ithao123.cn/content-8283052.html(解决txt文档乱码)


iOS 照片开发 :http://kayosite.com/ios-development-and-detail-of-photo-framework.html


IOS 日历开发 :http://blog.csdn.net/jasonblog/article/details/21977481 http://blog.csdn.net/yanfangjin/article/details/7750792


 IOS 后台多任务 http://ningandjiao.iteye.com/blog/2012825


打包 http://www.itnose.net/detail/6304669.html


3D Touch: http://blog.csdn.net/qq_25475307/article/details/49495865


跳转系统设置

http://www.2cto.com/kf/201506/405779.html


不定长参数

- (void)setGradientColor:(UIColor *)beginColor transitionColor:(UIColor *)transitionColor,...NS_REQUIRES_NIL_TERMINATION ;

// NS_REQUIRES_NIL_TERMINATION, 用于编译时非nil结尾的检查


- (void)setGradientColor:(UIColor *)beginColor transitionColor:(UIColor *)transitionColor, ...{

    

    [self.gradientColorsaddObject:(id)beginColor];

    

    // 定义一个指向可选参数列表的指针

    

    va_list args;

    

    

    

    // 获取第一个可选参数的地址,此时参数列表指针指向函数参数列表中的第一个可选参数

    

    va_start(args, transitionColor);

    

    

    

    if(transitionColor)

        

    {

        

        [self.gradientColorsaddObject:(id)transitionColor];

        

        

        

        // 遍历参数列表中的参数,并使参数列表指针指向参数列表中的下一个参数

        

        UIColor *nextArg;

        

        while((nextArg = va_arg(args,UIColor *)))

            

        {

            

            [self.gradientColorsaddObject:(id)nextArg];

            

        }

        

    }

    

    // 结束可变参数的获取(清空参数列表)

    

    va_end(args);

    

}

多张图片合成视频 http://blog.csdn.net/a416863220/article/details/41113869
视频添加背景音乐 http://blog.csdn.net/a416863220/article/details/41113867 


UIlabel:   

 //宽度不变,根据字的多少计算label的高度

    NSString *str = @"可以更改此内容进行测试,宽度不变,高度根据内容自动调节";
    CGSize size = [str sizeWithFont:label.font constrainedToSize:CGSizeMake(label.frame.size.width, MAXFLOAT) lineBreakMode:NSLineBreakByWordWrapping];
    
    //高度固定不折行,根据字的多少计算label的宽度
    NSString *str = @"高度不变获取宽度,获取字符串不折行单行显示时所需要的长度";

    CGSize size = [str sizeWithFont:label.font constrainedToSize:CGSizeMake(MAXFLOAT, label.frame.size.height)];

同一label字体颜色不同:

NSMutableAttributedString  *str = [[ NSMutableAttributedString  alloc] initWithString:@ "Using NSAttributed String" ];
[str addAttribute: NSForegroundColorAttributeName  value:[UIColor blueColor] range: NSMakeRange (0,5)];
[str addAttribute: NSForegroundColorAttributeName  value:[UIColor redColor] range: NSMakeRange (6,12)];
[str addAttribute: NSForegroundColorAttributeName  value:[UIColor greenColor] range: NSMakeRange (19,6)];
[str addAttribute: NSFontAttributeName  value:[UIFont fontWithName:@ "Arial-BoldItalicMT"  size:30.0] range: NSMakeRange (0, 5)];
[str addAttribute: NSFontAttributeName  value:[UIFont fontWithName:@ "HelveticaNeue-Bold"  size:30.0] range: NSMakeRange (6, 12)];
[str addAttribute: NSFontAttributeName  value:[UIFont fontWithName:@ "Courier-BoldOblique"  size:30.0] range: NSMakeRange (19, 6)];
attrLabel.attributedText = str;


//UILabel各种字体效果 http://www.th7.cn/Program/IOS/201403/180653.shtml

//UILable显示html内容得方法

    NSError *error = nil;

        NSString * htmlString = [NSStringstringWithFormat:@"<html><body> %@ </body></html>",@"<h1>一个无序列表:</h1> <ul>  <li>咖啡</li><li></li> <li>牛奶</li></ul>"];


        NSAttributedString * attrStr = [[NSAttributedStringalloc]initWithData:[htmlStringdataUsingEncoding:NSUnicodeStringEncoding]options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType}documentAttributes:nilerror:&error];

       

        [self.lable setAttributedText:attrStr];


UIview:

    view.layer.shadowOffset=CGSizeMake(1, 1);

    view.layer.shadowRadius=5;

    view.layer.shadowOpacity=1;//阴影的透明度

    view.layer.shadowColor=[UIColor blackColor].CGColor;


UItableview两种重用cell的方法

在此之前cell的重用写法是

static NSString *ID =@"cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];

if (cell == nil) {

    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID]; 

}

而之后多了这种写法

static NSString *ID = @"cell";

[self.tableView registerClass:[MyCell class] forCellReuseIdentifier:ID];

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];



UItableview点击效果

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    NSIndexPath *indeA = [NSIndexPathindexPathForItem:self.indexPath.rowinSection:0];

    if (indeA.row == indexPath.row) {

        return;

    }

    self.indexPath = indexPath;

    [tableView reloadRowsAtIndexPaths:@[indexPath,indeA]withRowAnimation:UITableViewRowAnimationFade];

   

}

UItableview 获取多选数据

 NSArray *select=[self.selectServicesTable indexPathsForSelectedRows];

        NSMutableIndexSet *indexset=[[NSMutableIndexSetalloc]init];

        for (NSIndexPath *pathin select)

        {

            [indexset addIndex: path.row];

        }

        NSArray *seleArray=[self.tableView_ModelobjectsAtIndexes:indexset];

 




UItableview pain风格sectionview不悬浮

    CGFloat dummyViewHeight = 40;

    UIView *dummyView = [[UIViewalloc]initWithFrame:CGRectMake(0,0,self.placardPostTableView.bounds.size.width, dummyViewHeight)];

    self.placardPostTableView.tableHeaderView = dummyView;

    self.placardPostTableView.contentInset =UIEdgeInsetsMake(-dummyViewHeight,0,0,0);


TabbarController

//图片和标题上移5

  [barItem setImageInsets:UIEdgeInsetsMake(-5,0,5,0)];

  [barItem setTitlePositionAdjustment:UIOffsetMake(0, -5)];


//barItem 选中后的背景图片

[self.tabBar setSelectionIndicatorImage:image];


//修改字体

    [barItem setTitleTextAttributes:[NSDictionarydictionaryWithObjectsAndKeys:

                                         [UIColorredColor],UITextAttributeTextColor,font_B(10),UITextAttributeFont,

                                         nil]forState:UIControlStateNormal];

        

   //高亮状态时字体大小设置,字体颜色有效

        [barItem setTitleTextAttributes:@{UITextAttributeTextColor : [UIColorblueColor],UITextAttributeFont:[UIFontfontWithName:@"Marion-Italic"size:14.0]}  forState:UIControlStateHighlighted];


版本检测:

http://blog.csdn.net/xiaoxuan415315/article/details/9383453


第三方

TPKeyboardAvoidingTableView 键盘遮挡输入框会上移并且点击键盘消失

jastor 数据模型

MMDrawerController 侧滑

ReactiveCocoa 联动模式

MBProgressHUD 弹窗

FMDB 数据库

MJRefresh  下拉刷新

zbarreaderview 二维码

MultiLayerNavigation 侧滑返回

NJKWebViewProgress 加载webview


管理xcode插件:http://blog.devtang.com/blog/2014/03/05/use-alcatraz-to-manage-xcode-plugins/


各种抽屉效果

https://github.com/kouliang/Drawer-Effect


https://github.com/romaonthego/RESideMenu

https://github.com/jaybinhe/Test_QQMainView


https://github.com/shinept/QQConfiguration


https://github.com/twotoasters/TWTSideMenuViewController


https://github.com/JVillella/JVFloatingDrawer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值