• 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 to constrain a UISlider in a UIToolbar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to constrain a UISlider in a UIToolbar?


  • Subject: Re: How to constrain a UISlider in a UIToolbar?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 30 Jul 2014 13:30:41 +0700

On 30 Jul 2014, at 11:27, Kyle Sluder <email@hidden> wrote:

>> On Jul 29, 2014, at 9:11 PM, "Gerriet M. Denkmann" <email@hidden> wrote:
>>
>>
>> But nobody ever cares to call sizeThatFits or systemLayoutSizeFittingSize.
>>
>> Overriding requiresConstraintBasedLayout and returning either YES or NO makes no difference.
>>
>> Anything else I forgot to override?
>
> Hmm, I'm pretty sure that’s all we override. Have you tried dropping our document title view into the toolbar and seeing what happens?

No, I did not. It depends on OFBindingPoint et al., which might depend on other things, etc., etc.
But I studied it diligently.

The problem (I guess) is that UIToolbar does not use LayoutConstraints at all. And it probably simply does not expect any of it's UIBarButtonItems to change their size.

Anyway, this:
override func viewDidLoad()
{
	let b = bottomToolBar.frame.size.width
	speedSlider.frame.size.width = b - 8
	super.viewDidLoad()
}

kind of works.
In Landscape the slider could be bigger though.
Maybe I could register for UIDeviceOrientationDidChangeNotifications and then do the same thing again.


Kind regards,

Gerriet.


_______________________________________________

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


  • Follow-Ups:
    • Re: How to constrain a UISlider in a UIToolbar?
      • From: Roland King <email@hidden>
References: 
 >How to constrain a UISlider in a UIToolbar? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to constrain a UISlider in a UIToolbar? (From: Kyle Sluder <email@hidden>)
 >Re: How to constrain a UISlider in a UIToolbar? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to constrain a UISlider in a UIToolbar? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: start with OSX 5.1.1
  • Next by Date: Re: start with OSX 5.1.1
  • Previous by thread: Re: How to constrain a UISlider in a UIToolbar?
  • Next by thread: Re: How to constrain a UISlider in a UIToolbar?
  • Index(es):
    • Date
    • Thread