swift pragma mark

As we all know, everyone uses #pragma mark - to logically organize code in OC to generate dividers

Use #pragma mark function specification to generate a function specification X

But in swift, this syntax is not supported. After all, it belongs to C syntax, so there are new syntaxes, such as: // MARK: // FIXME // TODO: etc.

// MARK: - generate divider

// MARK: Description

Don't forget that colon. . .

Reference: http://stackoverflow.com/questions/24017316/pragma-mark-in-swift



Author: Dong Pengyuan
Link : https://www.jianshu.com/p/83e3c502e807
Source: Jianshu The
copyright belongs to the author. For commercial reprints, please contact the author for authorization, and for non-commercial reprints, please indicate the source.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326533656&siteId=291194637