34

iOS 撸一个简单路由Router

 5 years ago
source link: http://www.cocoachina.com/ios/20180917/24928.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
平常开发中用户点击头像, 进入个人主页,这看似平常的操作, 背后极有可能会牵扯到多个模块。 再如: 视频模块的播放页, 有与视频相关的音乐,点击这些音乐,需要跳转到音乐模块的播放页, 这样视频与音乐模块之间,不可避免的会产生依赖或耦合。 这个问题让人脑壳疼,相信很多朋友都这样做过,写一些代理或通知, 不停的传递事件; 有时干脆直接导入另一个模块。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK