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

某些方法定义为内联函数比 Category 更合适 #26

Closed
iShawnWang opened this issue Jul 20, 2016 · 2 comments
Closed

某些方法定义为内联函数比 Category 更合适 #26

iShawnWang opened this issue Jul 20, 2016 · 2 comments

Comments

@iShawnWang
Copy link

感谢作者的分享这么丰富的 Category ,666

比如 NSObject+JKGCD.m 类中的 GCD 相关函数
正常使用是

[someObject jk_performAsynchronous{
    ...
}];

感觉不太合适,下面这样定义为内联函数会不会更好些 ?

NS_INLINE void ExecuteAsyncInGlobalQueue(void (^block)()){
    dispatch_async(getGlobalQueue(), block);
};
@shaojiankui
Copy link
Owner

合适是合适,但是本库是Category为核心。不会加任何这中函数。牺牲下体验吧。哈哈哈

@10YearsDiary
Copy link

10YearsDiary commented Dec 29, 2016 via email

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

3 participants