• 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: How do I set up image in segmented controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I set up image in segmented controller?


  • Subject: Re: How do I set up image in segmented controller?
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 11 Aug 2011 09:45:15 +1000

Good morning Shane, and thanks for your efforts with the excellent eBook.


I think my problem lies with this.


A UISegmentedControl object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls.

A segmented control can display a title (an NSString object) or an image (UIImage object). The UISegmentedControl object automatically resizes segments to fit proportionally within their superview unless they have a specific width set. When you add and remove segments, you can request that the action be animated with sliding and fading effects.
You register the target-action methods for a segmented control using the UIControlEventValueChanged constant as shown below.
[segmentedControl addTarget:self
                     action:@selector(action:)
           forControlEvents:UIControlEventValueChanged];
How you configure a segmented control can affect its display behavior:
  • If you set a segmented control to have a momentary style, a segment doesn’t show itself as selected (blue background) when the user touches it. The disclosure button is always momentary and doesn’t affect the actual selection.
  • Prior to iOS 3.0, if a segmented control has only two segments, then it behaves like a switch—tapping the currently-selected segment causes the other segment to be selected. (On iOS 3.0 and later, tapping the currently-selected segment does not cause the other segment to be selected.)
I'm not getting any image at all, and converting the bit above to ASOC is beyond my very limited knowledge.

It's from this page….

http://developer.apple.com/library/ios/#documentation/uikit/reference/UISegmentedControl_Class/Reference/UISegmentedControl.html

Regards

Santa



On 11/08/2011, at 9:06 AM, Shane Stanley wrote:

From the docs: "Images are not scaled to fit inside a segment. If the image is larger than the available space, it is clipped." Is that your problem?


--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How do I set up image in segmented controller? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: What can I use for dynamic menu please?
  • Next by Date: Re: How do I set up image in segmented controller?
  • Previous by thread: How do I set up image in segmented controller?
  • Next by thread: Re: How do I set up image in segmented controller?
  • Index(es):
    • Date
    • Thread