Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected ‘@’ in program. 直接在协议文件h.里面实现 报警告 求解答 #3

Open
ghost opened this issue Apr 2, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 2, 2017

00

@protocol Forkable

@optional

  • (void)fork;

@required

  • (NSString *)github;

  • (void)jzj;
    @EnD
    // Protocol Extension
    @defs(Forkable)

  • (void)fork {
    NSLog(@"Forkable protocol extension: I'm forking (%@).", self.github);
    }

  • (void)jzj {

    NSLog(@"jzj");
    }

  • (NSString *)github {
    return @"This is a required method, concrete class must override me.";
    }
    @EnD

@beforeold
Copy link

beforeold commented Jul 6, 2017

Obviously, it is FORBIDDEN to implement any method in a .h file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant