标签:style blog io color 使用 sp on div log
A.继承的实现: is a
1 #import <Foundation/Foundation.h> 2 3 @interface Zombie : NSObject 4 - (void) walk; 5 + (void) test; 6 @end 7 8 @interface JumpZombie : Zombie 9 - (void) walk; 10 + (void) test; 11 @end 12 13 @implementation Zombie 14 - (void) walk 15 { 16 NSLog(@"往前挪两步"); 17 } 18 19 + (void) test 20 { 21 NSLog(@"哈哈"); 22 } 23 @end 24 25 @implementation JumpZombie 26 - (void) walk 27 { 28 NSLog(@"跳两下"); 29 [super walk]; 30 } 31 32 + (void) test 33 { 34 NSLog(@"呵呵"); 35 [super test]; 36 } 37 38 @end 39 40 41 int main() 42 { 43 JumpZombie *jz = [JumpZombie new]; 44 [jz walk]; 45 [JumpZombie test]; 46 return 0; 47 }
标签:style blog io color 使用 sp on div log
原文地址:http://www.cnblogs.com/hellovoidworld/p/4119351.html