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
- Title of page
- Introductory paragraph of page
- Thumbnail image associated with the page
WikiView is Carthage compatible. To include it add the following line to your Cartfile
github "tforzaglia/WikiView" ~> 1.0Then run
carthage updateAnd drag the following frameworks into the Link Frameworks and Libraries section of your app's target
WikiView.framework
Alamofire.framework
SwiftyJSON.framework
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
}
)brew install carthagecd $repo_root_dir
carthage bootstrapopen WikiView.xcodeproj