/PioneerNewsLibrary

A library for implementing a simple News app with multiple sections

Primary LanguageSwift

PioneerNewsLibrary

A library for implementing a simple News app with multiple sections

##Features

  • Have multiple sections of your news. (ex. Latest, Startups, Mobile, Social, etc.)
  • Fading Feature Images
  • Pull to refresh sections
  • ImageCaching

alt text

##Setup

  1. Add a podfile and add:
    • pod 'TabPageViewController'
    • pod 'Fuzi', '~> 0.3.0'
    • pod 'Kingfisher', '~> 2.4'
  2. Add PioneerNewsLibrary Files to xcode project
  3. Add Code
let newsVC = self.createNewsContainerViewController()
containerVC.delegate = self
containerVC.dataSource = self
newsVC.presentInViewController(self, animated: true) {}

###DataSource

func newsContainerViewControllerShouldLoadStoryHTMLBody(newsContainerViewController: NewsContainerViewController) -> Bool
func newsContainerViewControllerSectionTitles(newsContainerViewController: NewsContainerViewController) -> [String]
func newsContainerViewController(newsContainerViewController: NewsContainerViewController, storiesAtIndex index: Int) -> [Story]

###Delegate

func newsContainerViewController(newsContainerViewController: NewsContainerViewController, refreshStoriesForSectionIndex index:Int, completion: (updatedStories: [Story]?) -> Void)
func newsContainerViewController(newsContainerViewController: NewsContainerViewController, didTapStory story: Story)

##To be added

  • Day/Night Mode
  • Foldable dropdown description of articles