OC中的 延展

#import <Foundation/Foundation.h>

@interface Student : NSObject

-(void)Dothing;

@end

 

#import "Student.h"

 

@interface Student ()

-(void)Sleep;

@end

 

#import "Student.h"

 

@implementation Student

-(void)Dothing

{

    NSLog(@"Dothing");

}

-(void)Sleep

{

    NSLog(@"Sleep");

}

@end

 

#import <Foundation/Foundation.h>

#import "Student.h"

//#import "Student_Sleep.h"

int main(int argc, const char * argv[])

{

    @autoreleasepool

{

        Student *stu=[[Student alloc] init];

        [stu Dothing];

        [stu Sleep];    

    }

    return 0;

}

 

posted @ 2016-03-05 08:26  唐唐_010  阅读(171)  评论(0编辑  收藏  举报