• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UISegmentedControl -selectSegmentAtIndex:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UISegmentedControl -selectSegmentAtIndex:?


  • Subject: Re: UISegmentedControl -selectSegmentAtIndex:?
  • From: Jon Sigman <email@hidden>
  • Date: Mon, 21 Mar 2011 19:03:43 -0700 (PDT)

Thanks, Luke. Somehow I was thinking that was a read-only property ("selected" =
past tense). My bad.




________________________________
From: Luke the Hiesterman <email@hidden>
To: Jon Sigman <email@hidden>
Cc: email@hidden
Sent: Mon, March 21, 2011 6:53:58 PM
Subject: Re: UISegmentedControl -selectSegmentAtIndex:?

@property(nonatomic) NSInteger selectedSegmentIndex;

so, segmentedControl.selectedSegmentIndex = theIndexYouWant;

Luke

On Mar 21, 2011, at 6:49 PM, Jon Sigman wrote:

> iOS 4.3. I'm using a UISegmentedControl and want to preselect one of the
> segments in -viewDidLoad based on the last user setting stored in defaults.
>But,
>
> I can't find a -selectSegmentAtIndex: method or a reasonable facsimile. How can
>
> I go about doing this?
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >UISegmentedControl -selectSegmentAtIndex:? (From: Jon Sigman <email@hidden>)
 >Re: UISegmentedControl -selectSegmentAtIndex:? (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: UISegmentedControl -selectSegmentAtIndex:?
  • Next by Date: Error reporting in Cocoa (was Re: Exception not being caught)
  • Previous by thread: Re: UISegmentedControl -selectSegmentAtIndex:?
  • Next by thread: NSArrayController selected objects mystery
  • Index(es):
    • Date
    • Thread