Strava

Engineering Blog


iOS App Features and Shortcuts

Posted by Jeff on January 4th, 2013

In addition to major features like advanced segment effort analysis, club feeds, and notifications, the Strava iOS team recently shipped a handful of smaller features in version 3.1.1. Download it for free here. These shortcuts are geared toward making Strava for iPhone easier and faster to use.

  • Reveal full-size profile image
  • Long-tap on an activity in the Feed for Kudo/Comment shortcut
  • Kudo bomb
  • Additional sharing options from the Activity Detail screen
  • Landscape Segment Effort Analysis

Full-size Profile Images

While viewing an athlete’s profile, tap the athlete’s image to reveal a full screen view of their profile picture.

Kudo and Comment Shortcut

Tap an activity in the Feed to reveal an action sheet with shortcuts to kudo or comment on that activity.

Kudo Bomb

Shake your iOS device while viewing the “Also on this Activity” screen to reveal an action sheet with options to give kudos to everyone who was on that ride or run.

Additional Sharing Options

Twitter and Facebook aren’t the only ways you can share an activity. Tap the action button on the Activity Detail screen to reveal an action sheet with options to share via messages, email, or to copy the URL to the activity on Strava.

Landscape Segment Effort Analysis

Rotate your phone to landscape while looking at the new segment effort analysis screen to get a detailed view of the active graph.

Technical Discussion

This wouldn’t be a engineering blog post without at least some technical explanation. None of the features listed above require unusual or groundbreaking techniques, however they all reveal different ways that you can interact with the phone and provide your app’s users with additional affordance.

The Kudo Bomb feature is a cute illustration of the concept that different types of gestures can activate different features:

Implementing shake recognition on an iOS device is fairly straightforward. It so happens that UIViewController is a subclass of UIResponder. To handle custom touch events you’d override the -touches... methods and provide your own implementation for when the user touches the screen. To respond to motion events you override one or more the -motion... events, in our case -(void)motionEnded:withEvent:. We’re just interested in the shake motion which is UIEventSubtypeMotionShake (as of iOS 6, it’s the only motion subtype). So to do something when the user shakes the device while looking at your view controller you’d do something like this in your view controller:

Note that your view controller must be able to become the first responder, hence the overridden canBecomeFirstResponder method.

To test shake motions in the iOS simulator you can choose the Hardware > Shake Gesture menu item, or type ^⌘Z.

A fully functional example project is available on GitHub.

Comments Off

Recent Posts

  • Strava API Update
  • Evolution of an Easter Egg
  • iOS App Features and Shortcuts
  • Intent Filters in the 3.0 Android App
  • Attention Android Users: 3.0 Early Access is Available
  • KOMs, Powered By Redis
  • Your Suffering + Our Code = Strava

Links

  • API Documentation
  • Work at Strava!

Subscribe to our RSS Feed


Strava — Built for Athletes
©2008-2013 Strava, Inc
All rights reserved.
About
  • About
  • How It Works
  • Features
  • Mobile
  • Premium
  • Privacy Policy
  • Terms and Conditions
Follow
  • Facebook
  • Twitter
  • Blog
Help
  • Support
  • FAQ
More
  • Sign Up
  • Log In
  • Strava Store
  • Careers
  • Ambassadors
  • Pros on Strava