Skip to content

iOS framework including a UIViewController for displaying contents of Wikipedia page

Notifications You must be signed in to change notification settings

tforzaglia/WikiView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carthage compatible

WikiView

iOS framework that provides a UIViewController subclass for displaying contents of Wikipedia page. The framework also provides a way to get just the WikiPage object so that you can use it with your own custom view controllers.

Currently, the WikiPage object contains properties for

  1. Title of page
  2. Introductory paragraph of page
  3. Thumbnail image associated with the page

Installation

Carthage

WikiView is Carthage compatible. To include it add the following line to your Cartfile

github "tforzaglia/WikiView" ~> 1.0

Then run

carthage update

And drag the following frameworks into the Link Frameworks and Libraries section of your app's target

WikiView.framework
Alamofire.framework
SwiftyJSON.framework

Example Usage

The WikiPageViewController can be presented like any other UIViewController in you app

let wikiViewController = WikiPageViewController(withSearchTerm: "iOS")
present(wikiViewController, animated: true)

Or, if you prefer to use the WikiPage object as a source for your own UIViewController

let wikiPageController = WikiPageController()
wikiPageController.getWikiPage(
    withSearchTerm: "iOS",
    onSuccess: { wikiPage in
        // set wiki page to a property
    },
    onError: { error in
        // handle error here
    }
)

To Build

Install Carthage

brew install carthage

Build dependencies

cd $repo_root_dir
carthage bootstrap

Open WikiView.xcodeproj

open WikiView.xcodeproj

About

iOS framework including a UIViewController for displaying contents of Wikipedia page

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published