Skip to content →

Month: May 2018

Covert GPX to Strava Route

Strava has a labs feature to convert a GPX file to a route: Strava GPX to Route.

But it doesn’t work for me:
Strava GPX to Route Error

And I’m not the only one:
Error computing Route when loading a GPX file

Here is a workaround for converting a GPX file to Strava Route:

1. Export the GPX file.

2. Go to GPSies and import your GPX file:

GPSies Import

Verify it:

GPSies Verify

It adds a timing of 10 mph. You can change this, but it doesn’t matter.

3. Export the GPX Track file.

GPSies Export

4. Go Strava and Upload Activity.

Strava Upload

Click Choose File and select the GPX file exported from GPSies. This will create a new ride.

5. Save the activity as a route.

Strava Create Route

Strava Route Verify

Strava Name Route

6. Delete the activity.

Strava Delete

Comments closed

iOS Swipe Keyboard to dismiss

In iOS 7, Apple added an option to UIScrollView which could allow you to dismiss the keyboard when dragged.

UIScrollViewKeyboardDismissMode

public enum UIScrollViewKeyboardDismissMode : Int {

    case none

    case onDrag // dismisses the keyboard when a drag begins

    case interactive // the keyboard follows the dragging touch off screen, and may be pulled upward again to cancel the dismiss
}

This is very easy to do. Just set the keyboardDismissMode property to .onDrag or interactive:

let tableView = UITableView(frame: .zero, style: .plain)
tableView.keyboardDismissMode = .interactive

You should set this on all tableviews that contain text fields.

For example code, see: https://github.com/dougdiego/iOSDemos

Comments closed