首页
学习
活动
专区
工具
TVP
发布

Objective-C中NSArray类的解读

NSArray中属性与方法: //获取数组中元素个数 @property (readonly) NSUInteger count; //通过下标获数组中的元素 - (ObjectType)objectAtIndex...:(NSUInteger)index; //初始化方法 - (instancetype)init; //通过C语言风格的数组创建NSArray对象 需要注意,C数组中需要为Objective对象,cnt...inRange:(NSRange)range; //获取与给定元素相同的元素在数组中的最小下标值 - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)...anObject; //在一定范围内 获取与给定元素相同的元素在数组中的最小下标值 - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject..., NSUInteger idx, BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0); //同上 在一定下标集合中遍历 - (NSUInteger)indexOfObjectAtIndexes

1.2K20
您找到你想要的搜索结果了吗?
是的
没有找到

iOS网络编程之六——数据缓存类NSURLCache使用解析

diskCapacity 设置磁盘缓存容量 path 磁盘缓存路径 内容缓存会在应用程序退出后 清空 磁盘缓存不会 */ - (instancetype)initWithMemoryCapacity:(NSUInteger...)memoryCapacity diskCapacity:(NSUInteger)diskCapacity diskPath:(nullable NSString *)path; //获取某一请求的缓存... (void)removeCachedResponsesSinceDate:(NSDate *)date NS_AVAILABLE(10_10, 8_0); //内存缓存容量大小 @property NSUInteger... memoryCapacity; //磁盘缓存容量大小 @property NSUInteger diskCapacity; //当前已用内存容量 @property (readonly) NSUInteger... currentMemoryUsage; //当前已用磁盘容量 @property (readonly) NSUInteger currentDiskUsage; 专注技术,热爱生活,交流技术,也做朋友

34320

UIGestureRecognizer  手势识别一、概念介绍二、UIView 的分类三、UIGestureRecognizer 抽象类四、UIGestureRecognizerDelegate 代理

doubleRecognizer]; 5、获取当前触摸在指定视图上的点 - (CGPoint)locationInView:(nullable UIView*)view; 6、获取触摸手指数 - (NSUInteger...)numberOfTouches; 7、多指触摸的触摸点相对于指定视图的位置 - (CGPoint)locationOfTouch:(NSUInteger)touchIndex inView:(nullable...numberOfTapsRequired; 2、 设置能识别到手势的最少的手指的个数(默认为1) @property (nonatomic) NSUInteger numberOfTouchesRequired...numberOfTapsRequired; 2、最少触摸手指个数,默认为1 @property (nonatomic) NSUInteger numberOfTouchesRequired;、 3、....recognizer.rotation = 0; } 九、UIPanGestureRecognizer(拖拽手势) 1、设置触发拖拽最少手指数,默认为1 @property (nonatomic) NSUInteger

2.7K80
领券