Skip to content

lucaseneasneves/findr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Findr

[![CI Status](http://img.shields.io/travis/Pedro Fabrino/Findr.svg?style=flat)](https://travis-ci.org/Pedro Fabrino/Findr) Version License Platform

Findr was developed in a AIS Hackathon

Requirements

Installation

Findr is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Findr" , :git => 'https://github.com/fatalhck/findr/releases/tag/0.4.2'

Author

Lucas Neves, Pedro Fabrino, Jonathan Nobre

Contributors

Victor Cotrim Luciano Almeida

How to use

  1. Create a Capture Session with FindrViewController and verify if result don't have any error
let result = FindrViewController.createCaptureSession()
if result.error != nil {
  // present alert error
  return
}
  1. Create an empty FindrAnottation array
  2. Create an FindrAnottation and seed this with location, title and active then
let annotation = FindrAnnotation()
annotation.location = some CLLocation object
annotation.title = some title
annotation.active = true
  1. Append annotation to empty FindrAnnotations array
  2. Init FindrViewController and set the data source to self
let arViewController = FindrViewController()
arViewController.dataSource = self
  1. Set the FindrAnottations array to instanciated FindrViewController
arViewController.setAnnotations(annotations)
  1. Present then
self.present(arViewController, animated: true, completion: nil)
  1. Make an extension of ARDataSource and implements this method:
func ar(_ findrViewController: FindrViewController, viewForAnnotation: FindrAnnotation) -> FindrAnnotationView {

  	let annotation = FindrAnnotationView(frame: YOUR FRAME CONFIGURATION)
  	annotation.backgroundColor = UIColor.red
  	annotation.annotation = viewForAnnotation

  	return annotation
  }

License

Findr is available under the MIT license. See the LICENSE file for more info.