摘要:
用C代替OC:#import#import#importexternintUIApplicationMain (intargc,char*argv[],void*principalClassName,void*delegateClassName);structRect {floatx;floaty;... 阅读全文
摘要:
11、系统类的方法实现部分替换- (void) methodExchange { Method m1 = class_getInstanceMethod([NSString class], @selector(lowercaseString)); Method m2 = class_getIn... 阅读全文
摘要:
6、获取一个类的所有方法:u_int count; Method * methods = class_copyMethodList([CustomClass class], &count); for (int i = 0; i < count; i++) { SEL name ... 阅读全文
摘要:
创建公共类:@interface CustomClass : NSObject- (void) fun1;@end@implementation CustomClass-(void)fun1{ NSLog(@"fun1");}@end@interface TestClass : NSObject@... 阅读全文