, . , . . . , , . c, , , .
, , , , NString . - NSString
NSString-Encryption.h
@interface NSString (Encryption)
-(NSString*) encrypt;
@end
NSString-Encryption.m
#import "NSString-Encryption.h"
@implementation NSString (Encryption)
-(NSString*) encrypt
{
return encryptedString;
}
@end
UseNSString-encryption.m
NSString *testString = @"this is test";
NSString *encryptedString = [testString encrypt];
, , . NSMutableString , NSString. .
, .
, , c . .m .h.
.h
@interface Phone:NSObject
-(void) call;
@end
.m
@interface Phone(Private)
-(void) validatePhoneEntry:(NSString*) phoneNumber;
@end
@implementation Phone
-(void) validatePhoneEntry:(NSString*) phoneNumber
{
}
-(void) call
{
}
@end
, , - .