• 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
Auto Layout and Multiline labels iOS 8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Auto Layout and Multiline labels iOS 8


  • Subject: Auto Layout and Multiline labels iOS 8
  • From: Daniel Phillips <email@hidden>
  • Date: Fri, 15 Jan 2016 16:07:22 +0000

Hello group,

I am really stuck and I would really appreciate your thoughts on something - I’ve got a custom UIView which I want to use in a few places in my app, I have a bunch of labels, some of which are multiline.

The layout of my view is a kind of 2 column style, on the left I have 3 multiline labels stacked one on top of another. On the right I have 2 labels (which aren’t multiline).

On iOS 9 I get the desired layout, but on iOS 8, my multiline labels are truncating. However the dynamic cell height calculated by the system is rendering the cell at the expected height, yet the labels aren’t using the space.

Did something drastic change between iOS 8 and 9 that would have effected this? I can’t find anything to suggest it has. I am not using preferredMaxLayoutWidth because (and unless I’m completely mistaken) it prevents me from utilising the additional horizontal space I have on iPad or in landscape, unless I do some trickery in -layoutSubviews to “hack” it to update. As far as I’m aware that’s unnecessary since iOS 8 (see http://www.brightec.co.uk/ideas/preferredmaxlayoutwidth).

I’ve made a sample project, I intend to bug report it, although I wanted to reach out here first because in all likeliness I’m doing something wrong/strange/incorrect. Please if you have a few minutes take a look, I didn’t do auto layout in IB so you should be able to see the constraints in TTLTravelOptionView.m in -updateConstraints. there’s also a screenshot from iOS 8 and 9 showing the strange iOS 8 rendering.

https://github.com/danielphillips/Multiline-Label-Issues <https://github.com/danielphillips/Multiline-Label-Issues>

Hoping someone will point me in the right direction.

Thanks for reading :)

Daniel
_______________________________________________

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


  • Prev by Date: Re: OT: Swift Code Autoformatter?
  • Next by Date: Re: drawRect: wrong scale in a programmatically created window
  • Previous by thread: Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB
  • Next by thread: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
  • Index(es):
    • Date
    • Thread