Hi everyone, welcome to the exciting world of Truncation, what is Truncation? It means that when I've got a text box inside of an auto layout... when my auto layout gets too small it kind of just squidges out, right? We can set the overflow, but it's not really what I want... what I want to do is this, watch this when it gets smaller... getting smaller, getting smaller, look at those three dotted lines...
so the text is truncated... it's really handy, we can set a maximum amount of lines... or we can let the auto layout decide the size... and it will automatically add the little dot, dot, dot... meaning there is more text in this text box that is able to be seen... truncated is the word, let me show you how to do it.
To get started I have got a text box, that's it, nothing else special about it... and what I can do is, with it selected... go to my advanced 'Type Settings'... and turn on 'Truncated Text', it's the little dot, dot, dot thing there... and sometimes nothing happens... because you need to actually make it smaller and then it will truncate.
There is another option for it... the truncating is that dot, dot, dot... more to be read... you can go a bit fancier... if you set the text box instead of this fixed height, or fixed size... go to this other one here, it says 'Auto Height'...
the cool thing about Auto Height is, with truncation off... it expands and contracts, depending on the size of the text that's in there. So it's a good place to start for anything... but what can happen is, if it's Auto Height... we can go to these 'Settings' here, and now we have, turn on this... 'Truncation', thank you, very much...
and you've got maximum lines, but you have to have the Auto Height on... I could say, actually, I just want three lines... I don't want to like drag it out... I want there always to be a maximum of three lines, there you go. Let's do something slightly fancier with an Auto Layout... so I've got my text box selected, nothing fancy about it...
I'm going to 'Shift A' to make it an Auto Layout... let's give it a quick 'Fill'... now if I make the text inside of this, truncated, perfect... with a Max Line of it, can have as many as it needs... I want the box to kind of resize for it... you see, that's not quite working, I want it to truncate...
so what I need to do is, truncation's turned on... but I need to say, this text box here, I want you to be, not fixed... and hugging the contents, I want you to say, 'Fill Container'... I'll let the outside container, so my backslash key, '\', to click the Parent... and now it should do more cool auto layout things, and truncate... there you go, that's truncating text...
funny word, and the thing to remember is, if you don't have the Max Lines... it's because we're on Fixed Size, we need to be on 'Auto Height'... and then turn it on, and there's our Max Lines... all right, truncating, I'll see you in the next video.