1.方法的命名規范,以NSString和NSMutableString為例
+ (instancetype)string;
+ (instancetype)stringWithString:(NSString *)string;
+ (instancetype)stringWithCharacters:(const unichar *)characters length:(NSUInteger)length;
- (NSString *)substringFromIndex:(NSUInteger)from;
- (NSUInteger)length;
- (void)getCharacters:(unichar *)buffer range:(NSRange)range;
- (BOOL)isEqualToString:(NSString *)aString;
//NSMutableString
- (void)appendString:(NSString *)aString;
2.類和協議的命名規范
NSArray、UIView
NSArray : NSMutableArray
UIView : UIImageView、UITableView ..
UITableView : UITableViewDelegate