forked from shaojiankui/JKCategories
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jakey
authored and
Jakey
committed
Mar 29, 2015
1 parent
bbe790f
commit 07339ff
Showing
186 changed files
with
595 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// | ||
// NSArray+SafeAccess.h | ||
// IOS-Categories | ||
// | ||
// Created by Jakey on 15/2/8. | ||
// Copyright (c) 2015年 www.skyfox.org. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface NSArray (SafeAccess) | ||
-(id)objectWithIndex:(NSUInteger)index; | ||
|
||
- (NSString*)stringWithIndex:(NSUInteger)index; | ||
|
||
- (NSNumber*)numberWithIndex:(NSUInteger)index; | ||
|
||
- (NSArray*)arrayWithIndex:(NSUInteger)index; | ||
|
||
- (NSDictionary*)dictionaryWithIndex:(NSUInteger)index; | ||
|
||
- (NSInteger)integerWithIndex:(NSUInteger)index; | ||
|
||
- (NSUInteger)unsignedIntegerWithIndex:(NSUInteger)index; | ||
|
||
- (BOOL)boolWithIndex:(NSUInteger)index; | ||
|
||
- (int16_t)int16WithIndex:(NSUInteger)index; | ||
|
||
- (int32_t)int32WithIndex:(NSUInteger)index; | ||
|
||
- (int64_t)int64WithIndex:(NSUInteger)index; | ||
|
||
- (char)charWithIndex:(NSUInteger)index; | ||
|
||
- (short)shortWithIndex:(NSUInteger)index; | ||
|
||
- (float)floatWithIndex:(NSUInteger)index; | ||
|
||
- (double)doubleWithIndex:(NSUInteger)index; | ||
|
||
//CG | ||
- (CGFloat)CGFloatWithIndex:(NSUInteger)index; | ||
|
||
- (CGPoint)pointWithIndex:(NSUInteger)index; | ||
|
||
- (CGSize)sizeWithIndex:(NSUInteger)index; | ||
|
||
- (CGRect)rectWithIndex:(NSUInteger)index; | ||
@end | ||
|
||
|
||
#pragma --mark NSMutableArray setter | ||
|
||
@interface NSMutableArray(SafeAccess) | ||
|
||
-(void)addObj:(id)i; | ||
|
||
-(void)addString:(NSString*)i; | ||
|
||
-(void)addBool:(BOOL)i; | ||
|
||
-(void)addInt:(int)i; | ||
|
||
-(void)addInteger:(NSInteger)i; | ||
|
||
-(void)addUnsignedInteger:(NSUInteger)i; | ||
|
||
-(void)addCGFloat:(CGFloat)f; | ||
|
||
-(void)addChar:(char)c; | ||
|
||
-(void)addFloat:(float)i; | ||
|
||
-(void)addPoint:(CGPoint)o; | ||
|
||
-(void)addSize:(CGSize)o; | ||
|
||
-(void)addRect:(CGRect)o; | ||
@end |
Oops, something went wrong.