Top Posts
Trip Report: A Rider’s Guide to Bikepacking in...
How to Hike a Colorado 14er: A Step-by-Step...
Trip Report: A Rider’s Guide to link Boulder...
Trip Report: A Rider’s Guide to the South...
Battling the Wind: Setting Your Shocks to Firm...
The Hike Map That Broke Me: How Gaia...
A Fond Farewell to National Geographic Maps —...
Introducing the Gaia Hike Map: Plan Your Hike,...
Download the app and get a free 14-day...
Gaia GPS is Improving Satellite Imagery: Saying Goodbye...
Gaia GPS
  • Explore The Map
  • Get the App
  • Upgrade Today
  • Explore The Map Catalog
  • New Features
  • Activities
    • Backcountry Skiing
    • Boating
    • Emergency Response
    • Fishing
    • Offroading
  • Adventures
    • User Stories
  • Help
Tag:

technical post

Gaia GPS

Technical Post: UISegmentedControl subclass for iOS5

by Staff Reports September 6, 2011
written by Staff Reports

Lately, we have been tweaking our apps to be compatible with iOS5.

One thing we noticed is that the UISegmentedControl, which shows a bar of menu options, no longer works exactly as it did under iOS4. Specifically, when you programatically set the selectedSegmentIndex property, it no longer calls the associated method. Under iOS4, when the user pressed the menu option, or you set the index, the method would run. But under iOS5, it only gets run if the user presses the button. You can see this bug popping up on the internet here.

Rather than put a bunch of logic throughout my code to deal with this, I developed this subclass of UISegmentedControl on the advice of Anna, which works as expected. Download it from GitHub here.

September 6, 2011
0 FacebookTwitterLinkedinRedditEmail
Load More Posts

Categories

  • Adventures
  • Android
  • App Comparisons
  • App Updates
  • Backcountry Skiing
  • Boating
  • Company News
  • Emergency Response
  • Featured
  • Fishing
  • Gaia GPS
  • Gaia GPS Offroad Podcast
  • GaiaCloud
  • Hikes
  • How-To
  • Hunting
  • iOS
  • New Features
  • New Maps
  • Newsletter
  • Offroading
  • Out and Back Podcast
  • Overlanding
  • User Profiles

Recent Posts

  • Trip Report: A Rider’s Guide to Bikepacking in Bears Ears National Monument
  • How to Hike a Colorado 14er: A Step-by-Step Guide with Gaia GPS
  • Trip Report: A Rider’s Guide to link Boulder and Steamboat Springs
  • Trip Report: A Rider’s Guide to the South Platte’s Best Trails and Roads
    • Facebook
    • Twitter
    • Instagram
    • Youtube
    • Rss
    • Explore The Map
    • Get the App
    • Upgrade Today
    • Explore The Map Catalog
    • New Features
    • Activities
      • Backcountry Skiing
      • Boating
      • Emergency Response
      • Fishing
      • Offroading
    • Adventures
      • User Stories
    • Help

    @2024 - All Right Reserved. Gaia GPS


    Back To Top
    Gaia GPS
    • Explore The Map
    • Get the App
    • Upgrade Today
    • Explore The Map Catalog
    • New Features
    • Activities
      • Backcountry Skiing
      • Boating
      • Emergency Response
      • Fishing
      • Offroading
    • Adventures
      • User Stories
    • Help