知乎日報 (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

實現的功能

  • 首頁左滑菜單界面
  • 文章詳情界面
  • 文章詳情界面上下切換的動畫
  • 主題文章界面

運行效果

1.png
2.png
3.png
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

使用的開源庫

Thanks to all of you

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 發現 關注 消息 iOS 第三方庫、插件、知名博客總結 作者大灰狼的小綿羊哥哥關注 2017.06.26 09:4...
    肇東周閱讀 12,198評論 4 61
  • 文/無憂先生 秒針無助的奔跑 時針慢搖 日期每天眨眼一跳 一夜一曉 它記載著人生的每一刻美妙 也標記著痛與煩躁 它...
    無憂先生閱讀 245評論 0 4
  • 終知道:一個人就是一本書, 一個人就是一個故事 ,一人就是一世界。 誰的路都是探索著走出來的 誰也不知道明天會發生...
    符號小姐閱讀 266評論 0 0
  • 成長之路,總會有遺憾,也就是這樣才明白,能珍惜的是現在,能真愛的是眼前人。 -1- 其實成長這個話題,很多作者都已...
    子豪同學c閱讀 438評論 2 1