-
Notifications
You must be signed in to change notification settings - Fork 139
/
Copy pathAuto Layout Errata.txt
65 lines (33 loc) · 3.09 KB
/
Auto Layout Errata.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Auto Layout Errata
Chapter 1, Missing Views with Inconsistent Rules, page 14
In the second of the two constraints at the top of the page, the first item should be View B and the second should be View A to match the description "View B is twice the width of View A":
constraint = [NSLayoutConstraint constraintWithItem:viewB attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:viewA attribute:NSLayoutAttributeWidth multiplier:2.0f constant:0.0f];
Thanks, Matt Johnson
Chapter 1, Exercise 3 Page 29 and Answers to Exercises page 241
The references to view after the first line of the example should read testView to match the allocated view. (Thanks John Lindwall)
UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(50, 50, 100, 30)]; testView.backgroundColor = [UIColor blueColor];
[self.view addSubview: testView];
testView.translatesAutoresizingMaskIntoConstraints = NO;
Chapter 2, Exercise 7 Page 59
Reads: "If you add a button as a subview to View 2, where do you install a constraint between that button and View 1? Between that button and View 4?"
Should read "If you add a button as a subview to View 2, where do you install a constraint between that button and View 1? Between that button and View 2?"
This update matches the answers on page 243
Chapter 4, Exercise 8 page 143 / 247
“Chapter 4 Exercise 8 seems to have a mistake. Either the format string should be "V:|-(-20)-[view1(==50)]" or the answer should refer to the horizontal axis instead of the vertical.” (Thanks Jean-Pierre Simard)
Should read "8. Describe the results the constraint @"V:|-(-20)-[view1(==50)]" produces." on both page 143 and 247 to match the answer on page 247
Chapter 5, page 154
"Example 5-5’s constraint derives from a function I built to add grid backsplashes to a view, as shown in Figure 5-4."
Should read: "Example 5-6’s constraint derives from a function I built to add grid backsplashes to a view, as shown in Figure 5-4."
Thanks Will Merrill
Chapter 7, Page 231
“Page 231 in the print copy, the 2nd last paragraph on the page states that baseline alignment is OSX-only (not supported by iOS) which is false. iOS supports baseline alignment, as indicated by other examples in the book.”
Yup, I should have edited this in the 2nd edition after 7.0. (Thanks Jean-Pierre Simard) Please discard the entire parenthetical comment.
FIRST EDITION
Chapter 1 (First Edition)
Second sentence in first chapter has "it's" when it should be "its" page 13 as a PDF "Introducing Auto Layout”, "Declaring Alignment Rectangles" has a problem in the first sentence: either the "a" should be removed, or it should be replaced with "us"
(Thanks Jonathan Thompson)
Chapter 1 (First Edition)
“leading and trailing—The leading and trailing edges of the view's alignment rectangle. In left-to-right (English-like) systems, these correspond to "left" (leading) and "right" (trailing). In right-to-left linguistic environments like Arabic or Hebrew, these roles flip; right is trailing, and left is leading. “
Should read “right is leading, and left is trailing”.
(Thanks Christoph Wendt)