> On Jul 29, 2014, at 2:34 AM, "Gerriet M. Denkmann" <gerr...@mdenkmann.de> > wrote: > > I have a UIToolbar which contains a UISlider, flanked by two flexible spaces. > I would like to have this slider to be as big as possible. > Setting it's width does not make sense, as the UIToolbar width changes, > depending on device and orientation. > > And setting constraints on the slider seems to be impossible (Xcode 6 beta 4). > > Any ideas?
You need to put your slider inside of a subclass of UIView whose implementation of -sizeThatFits: returns an appropriate value. In our document-based iPad apps, we use this technique to put a “Sync” button adjacent to the document title. Here’s the source code to our implementation: https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniUI/iPad-Document/OUIDocumentTitleView.m --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com