Giter Site home page Giter Site logo

zhmios / rxxmly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sessionch/rxxmly

0.0 0.0 0.0 98.67 MB

RxSwift 实现MVVM高仿喜马拉雅的函数响应式编程

Home Page: http://sessionch.com/rxswift/rxswift-learning-resource.html

Ruby 0.26% JavaScript 1.53% CSS 3.11% Swift 90.60% HTML 4.51%

rxxmly's Introduction

RxSwift实现MVVM高仿喜马拉雅的函数响应式编程

RxSwift 简介

ReactiveX(简写: Rx) 是一个可以帮助我们简化异步编程的框架。

它拓展了观察者模式。使你能够自由组合多个异步事件,而不需要去关心线程,同步,线程安全,并发数据以及I/O阻塞。

RxSwiftRx 的 Swift 版本。

它尝试将原有的一些概念移植到 iOS/macOS 平台。

你可以在这里找到跨平台文档 ReactiveX.io

RxSwift 参考资料

RxSwift 项目实战

动画演示

喜马拉雅演示动画

源码下载

RxSwift实现MVVM高仿喜马拉雅的函数响应式编程

注意事项

  • 1.源码下载后,执行 pod update --no-repo-update 更新第三方库;
  • 2.项目运行中,如果数据获取失败,一般是链接失效,需要自己重新去抓取相关的链接;
  • 3.项目仅供学习参考用,如有问题,欢迎指正;
  • 4.项目所使用的图片资源均是从原 喜马拉雅 FM 中扣出来的,图片资源巨多,只保留了 @2 倍的图片,依然还有两千多张,所有导致项目源码的体积很大。

项目计划

目前只是花了些零散的时间做了些基础的功能,项目中事件响应机制和逻辑部分基本是采用 RxSwift 方式来进行的,UI 组件的创建方式基本采用协议方式创建和添加,这种模式值得大家在合适的场合借鉴和采用。

当前已完成以下部分:

  • 1.【首页-推荐、精品】模块,其他模块可类比;该模块从数据抓取,数组处理和数据显示,均采用 MVVM 模式开发,对于学习 RxSwift 进行 MVVM 开发比较有借鉴作用;
  • 2.【登录】模块,比较形象的展现了 函数响应式编程 在进行状态转化方面的优势
  • 3.【我的、设置】模块,简易版 MVVM 模式开发,实现了比较典型的导航栏渐变和顶部图片下拉缩放的效果,如:QQ 空间,喜马拉雅 FM 我的页面的效果;
  • 4.【播放页面】模块待完善。

未来计划从以下两个方面着手:

  • 1.架构方面:目前重在学习 RxSwift 函数响应式编程,未来计划对项目架构进行进一步调整,构建成 RxSwift + ReactorKit 的信息流架构;
  • 2.功能方面:后期将加入音视频播放的功能。

效果截图

高仿喜马拉雅截图1-1

高仿喜马拉雅截图1-2

高仿喜马拉雅截图1-3

高仿喜马拉雅截图1-4

项目结构

喜马拉雅-目录结构

喜马拉雅-第三方库

rxxmly's People

Contributors

sessionch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.