Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions