知乎日报 (RxSwift 版本)

huaf22/zhihuSwiftDemo

把之前写的小项目升级到了 Swift 3.0 版本, 升级过程中变更不大, 并引入 RxSwift 框架和 MVVM 模式, 重构了大部分代码. RxSwift 和 RxCocoa 结合一起用还是很爽的, 很大程度上优化了业务控制流程.

Getting Started

  • 下载源码
git clone https://github.com/huaf22/zhihuSwiftDemo.git
  • 使用 pod 安装依赖
pod install
  • 使用 Xcode 打开 zhihuSwiftDemo.xcworkspace

实现的功能

  • 首页左滑菜单界面
  • 文章详情界面
  • 文章详情界面上下切换的动画
  • 主题文章界面

运行效果

知乎日报 (RxSwift 版本)_第1张图片
1.png
知乎日报 (RxSwift 版本)_第2张图片
2.png
知乎日报 (RxSwift 版本)_第3张图片
3.png
知乎日报 (RxSwift 版本)_第4张图片
4.png

代码结构

├── AppDelegate.swift
├── BCComponents
│   ├── Article
│   │   ├── View
│   │   │   ├── WLYArticleChannelView.swift
│   │   │   ├── WLYArticleDetailCell.swift
│   │   │   ├── WLYArticleDetailCollectionView.swift
│   │   │   ├── WLYArticleDetailRefreshView.swift
│   │   │   ├── WLYArticleDetailToolBarView.swift
│   │   │   ├── WLYArticleListView.swift
│   │   │   ├── WLYArticleNavigationBar.swift
│   │   │   └── WLYArticleTableViewCell.swift
│   │   ├── WLYArticleChannelViewController.swift
│   │   ├── WLYArticleDetailCollectionViewController.swift
│   │   └── WLYArticleListViewController.swift
│   └── Home
│       ├── View
│       │   ├── HomeSideMenuFooterView.swift
│       │   └── HomeSideMenuHeaderView.swift
│       └── WLYHomeMenuViewController.swift
├── Info.plist
├── LaunchScreen.storyboard
├── Library
│   ├── ArticleHTMLParser.swift
│   ├── Foundation
│   │   ├── DispatchQueue+Extension.swift
│   │   └── NotificationCenter+Extension.swift
│   ├── HTTPManager.swift
│   ├── UIKit
│   │   ├── UIColor+WLYCommon.swift
│   │   ├── UIColor+WLYExtension.swift
│   │   ├── UIScrollView+WLYPanGestureAllowEventPass.swift
│   │   └── UIView+WLYExtension.swift
│   ├── URLArrayTransform.swift
│   ├── Vendors
│   └── WLYLog.swift
├── Main.storyboard
├── Models
│   ├── WLYArticle.swift
│   ├── WLYArticleDetail.swift
│   ├── WLYArticleTheme.swift
│   ├── WLYArticleThemeResult.swift
│   ├── WLYDailyArticle.swift
│   ├── WLYEditor.swift
│   └── WLYThemeArticles.swift
├── Services
│   ├── ArticleService.swift
│   ├── BaseServiceAPI.swift
│   └── WLYArticleCacheService.swift
├── ViewControllers
│   ├── WLYSideMenuViewController.swift
│   ├── WLYTableViewController.swift
│   └── WLYViewController.swift
└── Views
    ├── UIScrollView+WLYPullToRefresh.swift
    ├── WLYCollectionViewCell.swift
    ├── WLYHorizontalLayoutButton.swift
    ├── WLYPullToRefreshPlugin.swift
    ├── WLYPullToRefreshView.swift
    ├── WLYRefreshLoadingView.swift
    ├── WLYScrollImageView.swift
    ├── WLYTableViewCell.swift
    └── WLYVerticalLayoutButton.swift

13 directories, 50 files

知乎日报 API

izzyleung/ZhihuDailyPurify

使用的开源库

  • SnapKit
  • Kingfisher
  • Alamofire
  • AlamofireObjectMapper
  • XCGLogger
  • RxSwift

Thanks to all of you

你可能感兴趣的:(知乎日报 (RxSwift 版本))