NSMutableDictionary是可变的NSDictionary,是NSDictionary的子类.NSMutableDictionary初始化方法 + (id)dictionaryWithCapacity:(NSUInteger)numItems- (id)initWithCapacity:...
分类:
其他好文 时间:
2014-07-25 19:13:41
阅读次数:
243
NSMutableArray是可变的NSArray,是NSArray的子类,可以随意的添加或者删除元素.创建NSMutableArray+ (id)arrayWithCapacity:(NSUInteger)numItems- (id)initWithCapacity:(NSUInteger)num...
分类:
其他好文 时间:
2014-07-25 14:05:31
阅读次数:
174
一组外企iOS开发的笔试题,您能回答出来吗?从群里收集来的。1 why can't NSArray contain NSInteger Instance? with which extra step can you do it?2.complete this code so that it beco...
分类:
移动开发 时间:
2014-07-23 12:08:16
阅读次数:
240
NSUInteger转换为NSNumber可以通过 NSNumber *aNumber = [NSNumber numberWithInteger:21]; 来转换,然后把NSNumber放到数组里 最后要用数据的时候,把NSNumber从数组里取出来,然后通过 NSInteger anInteger = ...
分类:
其他好文 时间:
2014-07-22 08:10:34
阅读次数:
199
#import #import @interface MjMusicViewController : UIViewController{ NSInteger controlPlayStyle; NSInteger controlPlay; NSMutableArray *timeA...
分类:
其他好文 时间:
2014-07-19 11:14:19
阅读次数:
303
CGFloat
const gestureMinimumTranslation = 20.0;
typedef enum :
NSInteger {
kCameraMoveDirectionNone,
kCameraMoveDirectionUp,
kCameraMoveDirectionDown,
kCameraMoveDirectionR...
分类:
其他好文 时间:
2014-07-17 16:00:46
阅读次数:
627
1,@property (nonatomic,readwrite)NSInteger score;注意这里有一个只读和只写的属性,readonly.2,重写初始化方法也可以改名字和传参数,(改名一般以initWith开头),-(instancetype) initWithCardCount:(NSU...
分类:
移动开发 时间:
2014-07-14 22:10:48
阅读次数:
389
Archiver是持久化数据的一种方式,他跟 Plist的区别在于他能持久化自定义对象。但他没Plist那么方便。
Archiver默认能持久化的数据有NSNumber,NSArray,NSDictionary,NSString,NSData,因为这几个对象已经实现了
协议。假设我们要实现一个对象的Archiver持久化 ,也必须实现该对象。...
分类:
移动开发 时间:
2014-07-12 23:24:17
阅读次数:
345
相关代码展示:#pragma mark - PSCollectionViewDelegate and DataSource methods- (NSInteger)numberOfRowsInCollectionView:(PSCollectionView *)collectionView{ re....
分类:
其他好文 时间:
2014-07-11 21:26:23
阅读次数:
316
Objective-C中常用的结构体NSRange,NSPoint,NSSize(CGSize),NSRect
1 NSRange
NSRange 的原型为
typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;
NSMakeRange的函数...
分类:
其他好文 时间:
2014-07-10 21:52:57
阅读次数:
217