821385843 / mgjrouter_swift Goto Github PK
View Code? Open in Web Editor NEWMGJRouter_Swift 是蘑菇街 MGJRouter 的 Swift 版,完全实现 MGJRouter 所有功能。
License: MIT License
MGJRouter_Swift 是蘑菇街 MGJRouter 的 Swift 版,完全实现 MGJRouter 所有功能。
License: MIT License
崩溃在MGJRouter的第340行
guard let queryItems = URLComponents.init(url: URL(string: fromURL)!, resolvingAgainstBaseURL: false)?.queryItems else {
if (subRoutes["_"] != nil) {
parameters["block"] = subRoutes["_"]
}
MGJRouter.registerWithHandler("jizhi://") { (routerParameters) in print("没有人处理该 URL,就只能 fallback 到这里了") }
MGJRouter.registerWithHandler("jizhi://login/login") { (routerParameters) in print("routerParameters:\(routerParameters ?? [:])") }
MGJRouter.canOpen(url: "jizhi://main")永远返回true,
MGJRouter.open("jizhi://login/login", params, nil)【没有人处理该 URL,就只能 fallback 到这里了永远被打印出来】,print("routerParameters:(routerParameters ?? [:])")不执行
我用ios12�测试,点击跳转后日志打印url了,没有触发跳转逻辑,ios14时是正常的。
请问MGJRouter(OC)中的Completion Block是不是没法转换成swift的闭包?
guard let queryItems = URLComponents(url: URL(string: fromURL)!, resolvingAgainstBaseURL: false)?.queryItems else
OC中注册
swift 中调用open
MGJRouter.open(Router_Tab) { result in
print(res)
}
在OC中completion(@"xxxx")报错 Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
oc可以在load注册,swift怎么办?
老哥,你真的太赞了,加油,这么好的Swift库,希望能持续更新~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.