We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { BOOL result = NO; for (id<SHModule> module in self.modules) { if ([module respondsToSelector:_cmd]) { result = result || [module application:app openURL:url options:options]; } } return result; }
这种带有BOOL返回值的,不能直接使用 result = result || [module application:app openURL:url options:options]; 这会导致如果一个模块实现了这个方法返回YES,那么他后面的模块都无法再调用这个方法。 应改为: BOOL moduleResult = [module application:app openURL:url options:options]; result = result || moduleResult;
BOOL moduleResult = [module application:app openURL:url options:options]; result = result || moduleResult;
The text was updated successfully, but these errors were encountered:
@kiss7xin 多谢,你可以发一个 pr 修正这个问题?我可以 merge。
Sorry, something went wrong.
No branches or pull requests
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { BOOL result = NO; for (id<SHModule> module in self.modules) { if ([module respondsToSelector:_cmd]) { result = result || [module application:app openURL:url options:options]; } } return result; }
这种带有BOOL返回值的,不能直接使用
result = result || [module application:app openURL:url options:options];
这会导致如果一个模块实现了这个方法返回YES,那么他后面的模块都无法再调用这个方法。
应改为:
BOOL moduleResult = [module application:app openURL:url options:options]; result = result || moduleResult;
The text was updated successfully, but these errors were encountered: