Beginning Xcode: Swift Edition by Matthew Knott
Author:Matthew Knott [Knott, Matthew]
Language: eng
Format: epub
Tags: Apress, Computers, Macintosh, Object Oriented, Programming
ISBN: 9781484205396
Google: 6vK8oQEACAAJ
Publisher: Apress
Published: 2014-12-19T05:00:00+00:00
Figure 8-26. Aligning the User Name label
The final object that needs to be added to the cell is a label for the tweet content. Drag in a label, and position it just below the User Name label. Make it the same width as the User Name label, and then increase the height until the margin guidelines at the bottom of the cell appear. It should resemble Figure 8-27.
Figure 8-27. Aligning the tweet Content label
In the Attributes Inspector, set the Text attribute to Content and the Lines attribute to 2. Xcode will wrap the text onto a second line if needed. If the text length exceeds what will fit on two lines, the Line Breaks attribute will determine what will happen. The default option is Truncate Tail, which cuts the text short and appends an ellipsis or … to the end of the text.
To align the interface elements, click the Resolve Auto Layout Issues button. Under All Views in TweetCell, choose Add Missing Constraints.
You’ve now built the interface for the custom cell. Next you need to create the outlets for the three objects. Open the Assistant Editor with the cell selected, and this time ensure that the code file that is loaded is TweetCell.swift; it’s likely that the file loaded is actually FeedViewController.swift. Click the file name on the jump bar, as shown in Figure 8-28. and then choose TweetCell.swift.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6532)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Kotlin in Action by Dmitry Jemerov(5062)
Odoo 15 Development Essentials - Fifth Edition by Daniel Reis & Greg Mader(3330)
Odoo 15 Development Essentials by Daniel Reis(2811)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(2526)
Learning Angular - Second Edition by Christoffer Noring(2355)
Pride and Prejudice by Jane Austen(2346)
Mobile Forensics Cookbook by Igor Mikhaylov(2014)
Computers For Seniors For Dummies by Nancy C. Muir(1995)
Bulletproof Android: Practical Advice for Building Secure Apps (Developer's Library) by Godfrey Nolan(1868)
Android Development with Kotlin by Marcin Moskala & Igor Wojda(1794)
Building Android UIs with Custom Views by Raimon Ràfols Montané(1786)
1936941139 (N) by Bob Rosenthal(1731)
Building Progressive Web Apps: Bringing the Power of Native to the Browser by Ater Tal(1722)
Hands-On Internet of Things with MQTT by Tim Pulver(1704)
Android App Development by Franceschi Hervé J.;(1702)
Ember.js in Action by Joachim Haagen Skeie(1686)
Hands-On Design Patterns with React Native by Mateusz Grzesiukiewicz(1652)
