Swift開源:ZhihuDailyPurify - 更純凈的知乎日報

MilEbsworth 8年前發布 | 14K 次閱讀 RxSwift Apple Swift開發

把之前寫的小項目升級到了 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

使用的開源庫

 

 本文由用戶 MilEbsworth 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!