Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Added animation to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
YOUR NAME committed May 4, 2016
1 parent b5d5b02 commit ddd4928
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
Binary file modified RPI Tours/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions RPI Tours/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ target 'RPI Tours' do
source 'https://github.com/CocoaPods/Specs.git'
pod 'Mapbox-iOS-SDK'

pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift'
#pod 'MapboxDirections.swift', :git => 'https://github.com/mapbox/MapboxDirections.swift.git'

pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'

pod 'CSwiftV', :git => 'https://github.com/Daniel1of1/CSwiftV.git'
end
Expand Down
16 changes: 0 additions & 16 deletions RPI Tours/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,38 +1,22 @@
PODS:
- CSwiftV (0.0.3)
- Mapbox-iOS-SDK (3.1.2)
- ReachabilitySwift (2.3.3)
- SwiftyJSON (2.3.2)

DEPENDENCIES:
- CSwiftV (from `https://github.com/Daniel1of1/CSwiftV.git`)
- Mapbox-iOS-SDK
- ReachabilitySwift (from `https://github.com/ashleymills/Reachability.swift`)
- SwiftyJSON (from `https://github.com/SwiftyJSON/SwiftyJSON.git`)

EXTERNAL SOURCES:
CSwiftV:
:git: https://github.com/Daniel1of1/CSwiftV.git
ReachabilitySwift:
:git: https://github.com/ashleymills/Reachability.swift
SwiftyJSON:
:git: https://github.com/SwiftyJSON/SwiftyJSON.git

CHECKOUT OPTIONS:
CSwiftV:
:commit: a1774b9dbae7b4d9fa288998362625cae9e12352
:git: https://github.com/Daniel1of1/CSwiftV.git
ReachabilitySwift:
:commit: cf126c0584a209143c75bf1d0f23fd904891e26e
:git: https://github.com/ashleymills/Reachability.swift
SwiftyJSON:
:commit: 42bdb102d2624b143c07850ebdc1537d5b6579b6
:git: https://github.com/SwiftyJSON/SwiftyJSON.git

SPEC CHECKSUMS:
CSwiftV: 93e3d4e1501f2a9b1eac3ae51d53a5edf41beb5b
Mapbox-iOS-SDK: 0a910c2cce1aa8cff5b9ec2a990e7a32332a776a
ReachabilitySwift: e0f6b6f280effb47731acfaaa2d5ffe223703793
SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a

COCOAPODS: 0.39.0
6 changes: 4 additions & 2 deletions RPI Tours/RPI Tours/DirectionsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ class DirectionsViewController: UIViewController, UITableViewDataSource, UITable

let stepLocation = CLLocation(latitude: (nextStep.maneuverLocation?.latitude)!, longitude: (nextStep.maneuverLocation?.longitude)!)
//print(self.locationManager.location?.distanceFromLocation(stepLocation))
if ( (self.locationManager.location?.distanceFromLocation(stepLocation)) < 5.0) {
directions.removeFirst()
if ( (self.locationManager.location?.distanceFromLocation(stepLocation)) < 3) {
let index = NSIndexPath(forRow: 0, inSection: 0)
self.directions.removeFirst()
self.tableView.deleteRowsAtIndexPaths([index], withRowAnimation: .Right)
self.tableView.reloadData()
}
}
Expand Down
15 changes: 15 additions & 0 deletions RPI Tours/RPI Tours/SelectedTourViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit
import Mapbox
import CoreLocation


class SelectedTourViewController: UITableViewController , CLLocationManagerDelegate {

//MARK: IBOUTLETS
Expand Down Expand Up @@ -130,6 +131,20 @@ class SelectedTourViewController: UITableViewController , CLLocationManagerDeleg
}
}

// let mapBox = CLLocationCoordinate2D(latitude: 38.9131752, longitude: -77.0324047)
// let whiteHouse = CLLocationCoordinate2D(latitude: 38.8977, longitude: -77.0365)
// let request = MBDirectionsRequest(sourceCoordinate: mapBox, destinationCoordinate: whiteHouse)
//
// // Use the older v4 endpoint for now, while v5 is in development.
// request.version = .Four
//
// let directions = MBDirections(request: request, accessToken: MapboxAccessToken)
// directions.calculateDirectionsWithCompletionHandler { (response, error) in
// if let route = response?.routes.first {
// print("Enjoy a trip down \(route.legs.first!.name)!")
// }
// }

}


Expand Down

0 comments on commit ddd4928

Please sign in to comment.