iOS Auto Layout Demystified
iOS Auto Layout Demystified

iOS Auto Layout Demystified

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

Completed Updated for iOS 7 and Xcode 5 Auto Layout transforms the way you create iOS user interfaces. As flexible as it is powerful, Auto Layout gives you unprecedented control over your iOS user interfaces. But Auto Layout has a reputation for difficulty. In iOS Auto Layout Demystified, Second Edition, world-renowned iOS developer and author Erica Sadun strips away the confusion, helping you gain Auto Layout mastery the easiest way possible: by example. Fully updated for iOS 7 and Xcode 5, this tutorial delivers everything Sadun’s guides are famous for: clear explanations, expert tips, proven best practices--and, above all, plenty of code to learn from and reuse. Step by step, Sadun explains how Auto Layout “thinks,” how it works, where it fits, and why it’s more useful (and simpler) than you ever imagined. She offers practical solutions for a wide variety of real-world iOS development challenges, plus innovative ways to use Auto Layout to build interactive elements, animations, and more. If you’re an experienced iOS developer, this guide will expand your design possibilities, helping you build apps that are superbly usable and intuitive and stand out even in the most crowded marketplace. Coverage includes Mastering Auto Layout’s basic concepts, techniques, and approach Defining unambiguous, satisfiable constraints that express your layout exactly how you intend Overcoming obstacles to constraint-based user interface design in Interface Builder Using visual formatting to express how items are laid out vertically and horizontally Making visual formats more flexible with metrics dictionaries and layout options Debugging constraints and deciphering those bewildering Xcode log messages Using descriptive techniques to uncover and express natural relationships in your design Applying iOS Auto Layout techniques in Mac OS X apps too

Table of Contents:
Preface   xiii Chapter 1: Introducing Auto Layout   1 Origins   1 Saying “Yes” to Auto Layout   2 Geometric Relationships   3 Content-Driven Layout   5 Prioritized Rules   6 Inspection and Modularization   6 Incremental Adoption   6 Constraints   7 Satisfiability   7 Sufficiency   8 Constraint Attributes   11 About Those Missing Views   12 Underconstrained Missing Views   13 Missing Views with Inconsistent Rules   14 Tracking Missing Views   14 Ambiguous Layout   15 Exercising Ambiguity   16 Visualizing Constraints   17 Intrinsic Content Size   18 Compression Resistance and Content Hugging   20 Image Embellishments   22 Alignment Rectangles   22 Visualizing Alignment Rectangles   24 Alignment Insets   24 Declaring Alignment Rectangles   26 Implementing Alignment Rectangles   27 Exercises   29 Conclusions   30 Chapter 2: Constraints   31 Constraint Types   31 Priorities   33 Conflicting Priorities   33 Enumerated Priorities   34 Content Size Constraints   36 Intrinsic Content Size   36 Content Hugging   36 Compression Resistance   38 Setting Content Size Constraints in Code   39 Setting Content Size Constraints in IB   40 Building Layout Constraints   41 The Layout Constraint Class   42 Constraint Math   42 First and Second Items   43 Creating Layout Constraints   44 Building NSLayoutConstraint Instances   45 Unary Constraints   45 Zero-Item Constraints Are Illegal   46 View Items   47 Constraints, Hierarchies, and Bounds Systems   48 Installing Constraints   50 Removing Constraints   52 Comparing Constraints   54 Matching Constraints   55 Laws of Layout Constraints   57 Exercises   59 Conclusions   59 Chapter 3: Interface Builder Layout   61 Designing in IB   61 Disabling Auto Layout   62 Opting Out of Auto Layout in Code   63 Combining Autosizing with Auto Layout   64 Basic Layout and Auto-Generated Constraints   64 Inferred Constraints   64 Ambiguity Resolution Constraints   67 Size Constraints   69 A Guided Tour of IB Elements   69 Constraint Listings   76 Xcode Labels   78 Adding Xcode Identities   79 Adding Constraints   80 Dragging   81 Pinning and Aligning   83 Previewing Layouts   85 Inspecting Constraints   88 View Size Inspector   90 Frame and Layout Rectangles   91 Other Size Inspector Items   92 The Resolution Menu   92 Updating Frames and Constraints   92 Adding and Resetting Constraints   93 Clearing Constraints   93 Constraints/Resizing Pop-Up Menu   93 Descendants   94 Siblings and Ancestors   95 The Missing Views Problem   95 Balancing Requests   97 Hybrid Layout   100 Building a Nib File for Testing   100 Adding the Nib File in Code   101 Advantages of Hybrid Layout   102 Removing IB-Generated Constraints   104 Exercises   105 Conclusions   108 Chapter 4: Visual Formats   109 Introducing Visual Format Constraints   109 Options   111 Alignment   112 Skipping Options   113 Variable Bindings   113 The Problem with Indirection   113 Indirection Workaround   114 Metrics   115 Real-World Metrics   115 Format String Structure   116 Orientation   116 Retrieving Constraints by Axis   117 View Names   117 Superviews   118 Connections   118 Empty Connections   118 Standard Spacers   119 Numeric Spacers   120 Referencing the Superview   120 Spacing from the Superview   122 Flexible Spaces   122 Parentheses   123 Negative Numbers   124 Priorities   124 Multiple Views   125 View Sizes   126 Format String Components   128 Getting It Wrong   130 NSLog and Visual Formats   131 Constraining to a Superview   132 View Stretching   133 Constraining Size   134 Building Rows or Columns   135 Matching Sizes   136 Why You Cannot Distribute Views   137 How to Pseudo-Distribute Views (Part 1: Equal Centers)    138 Pseudo-Distributing Views (Part 2: Spacer Views)    140 Exercises   143 Conclusions   143 Chapter 5: Debugging Constraints   145 Xcode Feedback   145 Development Feedback   145 Compiler Feedback   146 Runtime   146 Reading Console Logs   147 Autosizing Issues Example   147 Solution: Switch Off Autosizing Translation   148 Auto Layout Conflicts Example   149 Solution: Adjusting Priorities   150 The Nuclear Approach   150 The Balance Approach   151 Tracing Ambiguity   151 Examining Constraint Logs   152 Alignment Constraint Example   152 Standard Spacers Example   153 Equation-Based Constraint Example   153 Complex Equation Example   154 Multiplier and Constant Example   155 A Note About Layout Math   155 Constraint Equation Strings   156 Adding Names   159 Using Nametags   160 Naming Views   161 Describing Views   161 Unexpected Padding Example   164 The Hugged Image Example   165 View Centering Example   166 Retrieving Referencing Constraints   167 Descent Reports   169 Ambiguity Example   170 Expanding on Console Dumps Example   172 Visualizing Constraints   173 Automating Visualization   174 Launch Arguments   175 Internationalization   177 Doubled Strings (iOS/OS X)    177 Flipped Interfaces (OS X)    178 Flipped Interfaces (iOS)    179 Profiling Cocoa Layout   181 Auto Layout Rules of Debugging   183 Exercises   183 Conclusions   184 Chapter 6: Building with Auto Layout   185 Basic Principles of Auto Layout   185 Layout Libraries   186 Building Libraries   187 Planning Interfaces   190 Building for Modularity   191 Updating Constraints   194 Calling Updates and Animating Changes   195 Animating Constraint Changes on OS X   196 Fading Changes   197 Designing for Edge Conditions   198 Building a View Drawer   200 Building the Drawer Layout   203 Managing Layout for Dragged Views   206 Dragged Views   207 Window Boundaries   208 Exercises   211 Conclusions   211 Chapter 7: Layout Solutions   213 Table Cells   213 Auto Layout and Multiple-Height Table Cells   216 Preserving Image Aspect   217 Accordion Sizing   220 Scroll Views   221 Scroll Views and Pure Auto Layout   222 Hybrid Solution   222 Building a Paged Image Scroll View   223 Centering View Groups   226 Custom Multipliers and Random Positions   228 Building Grids   231 Making Room for the Keyboard   233 Inserting Views at Runtime   236 Adding iOS Frame and Constraint Overlays   237 Motion Effects, Dynamic Text, and Containers   238 Exercises   238 Conclusions   238 Appendix A: Answers to Exercises   241 Chapter 1   241 Chapter 2   242 Chapter 3   243 Chapter 4   245 Chapter 5   247 Chapter 6   248 Chapter 7   249 Index   251


Best Sellers


Product Details
  • ISBN-13: 9780321967190
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison-Wesley Educational Publishers Inc
  • Height: 229 mm
  • No of Pages: 288
  • Weight: 442 gr
  • ISBN-10: 0321967194
  • Publisher Date: 14 Nov 2013
  • Binding: Paperback
  • Language: English
  • Spine Width: 15 mm
  • Width: 181 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
iOS Auto Layout Demystified
Pearson Education (US) -
iOS Auto Layout Demystified
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

iOS Auto Layout Demystified

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!