码迷,mamicode.com
首页 >  
搜索关键字:nsditionary nsmutableditionary nsset nsmutableset    ( 346个结果
NSSet NSMutableSet的简单使用
//创建一个带多个参数的 NSSet *set=[NSSet setWithObjects:@"hello",@"hai", nil]; /* 所有 [set allObjects]; 随机一个 [set anyObject]; */ NSLog(@"set===%@",[set all...
分类:其他好文   时间:2015-02-11 10:42:47    阅读次数:122
iOS 利用UIPresentationController自定义转场动画
1. 系统默认modal出来的动画效果默认是从屏幕底部爬出来的- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ secondVC *second = [[secondVC alloc] init]; [self pr....
分类:移动开发   时间:2015-02-08 21:52:05    阅读次数:774
二维码
1.二维码生成#import@property(weak,nonatomic)IBOutletUIImageView *QRCImage;- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{// 1.创建滤镜CIFilte...
分类:其他好文   时间:2015-02-07 11:41:14    阅读次数:153
IOS 删除数组中重复的元素
NSArray *array = [[NSArray alloc] initWithObjects:@"12",@"2",@"3",@"2",@"1",@"5", nil];NSSet *uniqueElements = [ NSSet setWithArray :array ];for (id e...
分类:移动开发   时间:2015-02-07 11:37:06    阅读次数:185
iOS7: 漫谈基础集合类(NSArray,NSSet,NSOrderedSet,NSDictionary,NSMapTable,NSHashTable, NSPointerArray, NSIndexSet,NSCache, NSFastEnumeration)
基础集合类是每一个Mac/iOS应用的基本组成部分。在本文中,我们将对”老类”(NSArray, NSSet)和”新类”(NSMapTable, NSHashTable, NSPointerArray)进行一个深入的研究,探索每一个的效率细节,并讨论其使用场景。提示:本文包含一些参照结果,但它们并不...
分类:移动开发   时间:2015-02-04 21:38:14    阅读次数:702
OC NSSet、NSMutableSet、NSArray、NSMutableArray
不可变长度的Set @interface NSSet : NSObject   初始化方法 + (instancetype)set; //声明一个空集 + (instancetype)setWithObject:(id)object; + (instancetype)setWithObjects:(const id [])objects count:(NSUInteger)cnt; +...
分类:其他好文   时间:2015-02-04 12:53:39    阅读次数:179
「Foundation」字符串
一、Foundation框架中一些常用的类 字符串型: NSString:不可变字符串 NSMutableString:可变字符串 集合型: 1)NSArray:OC不可变数组 NSMutableArray:可变数组 2)NSSet: NSMutabl...
分类:其他好文   时间:2015-01-29 01:16:09    阅读次数:181
NSSet -- 集合&&NSMutableSet -- 可变集合
// // main.m // OC05-task-03 // // Created by Xin the Great on 15-1-25. // Copyright (c) 2015年 Xin the Great. All rights reserved. // #import int main(int argc, const char * argv[]) { @auto...
分类:其他好文   时间:2015-01-27 21:58:07    阅读次数:157
UI: UIGestureRecognizer IOS中手势的用法
UIGestureRecognizer 手势识别器,是常用手势的父类 可以手写代码,也可以拖拽应用手势。 1.触摸Touch 四个方法: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { _label1.text = @"触摸开始"; //1.获得触摸屏幕的手指 U...
分类:移动开发   时间:2015-01-27 11:22:01    阅读次数:230
iOS常见crash问题及crash日志分析
第一、插入空元素 对于NSMutableArray、NSMutableDictionary、NSMutableSet等可变的对象,插入空元素时crash 正确做法是加判断,sample code如下所示:    NSDictionary *dic;    NSMutableArray *arr=[NSMutableArray new];    if (dic) {         [a...
分类:移动开发   时间:2015-01-12 00:26:05    阅读次数:1223
346条   上一页 1 ... 24 25 26 27 28 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!