Comments (8)
from ctmediator.
源码里面- (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params shouldCacheTarget:(BOOL)shouldCacheTarget
这个是没有block的,所以回调不了
from ctmediator.
from ctmediator.
你指的是这段代码么?
id result = [self performTarget:url.host action:actionName params:params shouldCacheTarget:NO];
if (completion) {
if (result) {
completion(@{@"result":result});
} else {
completion(nil);
}
}
return result;
还是在params:params这个params里面塞一个block参数?
这个params是url里面的参数,没有办法塞block的
麻烦你了
from ctmediator.
from ctmediator.
是这样的,demo里确实有通过方法调用有block回调的。现在我是在你的基础上统一通过url方式调用本地组件。所以才有了这个问题。现在通过url方式是没有异步执行的。是这个问题。url方式也是可以通过paras去传递block的。
if (completion) {
params[@"actionDefaultBlock"] = completion;
}
id result = [self performModule:url.host action:actionName params:params shouldCacheModule:NO];
我在这里默认加了一个block,也是通过para传递的。
from ctmediator.
可以这么做的
from ctmediator.
我前面看错了。
你要用URL去做本地跳转?😂
我文章里面已经说得很清楚了,不要这么做。。。
from ctmediator.
Related Issues (20)
- target_action里面dalegate需要return值, 这个值如何传呢. HOT 4
- 使用upload.sh发版问题(本来想在上一个issues中提问, 但被关的太快了, 尴尬)
- NSClassFromString 获取pod库里面的类时,返回nil HOT 2
- 遇到不使用Class类名做moduleName的需求 HOT 1
- 引入HandyTools后在插件上无法使用
- 关于编译问题 HOT 10
- 关于keyWindow的问题 HOT 1
- safePerformAction 方法里边的 NSInvocation 和performSelector 调用有什么异同呢,两者取一个就行吧 HOT 3
- 你好我想问下组件 A 和 A_Category 是不是可以放在同一个私有 pod 库里? HOT 2
- 业务权限问题 HOT 12
- 请教一个硬编码的问题 HOT 1
- 关于组件化时重复引入基础库的问题? HOT 1
- 说明中的链接失效了
- CTMediator不维护了吗? HOT 1
- 大神, 除了cocoapods 还有没有别的好用的组件化方案, ?
- 引入CTMediator之后编译不通过,有没有遇到过相同问题的?
- 无法运行啊
- 请教为什么每个业务提供以独立repo形式提供Category HOT 2
- 通过NSClassFromString获取不到pod库里面的类 HOT 2
- 远程调用 Swift 响应者问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctmediator.