Skip to content

Commit d22694b

Browse files
committed
Debugging section in README, version bump
1 parent ea3bfab commit d22694b

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

KeepLayout.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Pod::Spec.new do |s|
22
s.name = "KeepLayout"
3-
s.version = "1.0.1"
3+
s.version = "1.0.2"
44
s.summary = "Making Auto Layout easier to code."
55
s.homepage = "https://github.com/iMartinKiss/KeepLayout"
66

77
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
88
s.author = 'Martin Kiss'
99

10-
s.source = { :git => "https://github.com/iMartinKiss/KeepLayout.git", :tag => "v1.0.1" }
10+
s.source = { :git => "https://github.com/iMartinKiss/KeepLayout.git", :tag => "v1.0.2" }
1111

1212
s.platform = :ios, '6.0'
1313

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,20 @@ These are instance methods and must be called on parent view of all affected sub
185185
See [`UIView+KeepLayout.h`][2] for more.
186186

187187

188+
## Debugging
189+
190+
Keep Layout uses its own `NSLayoutConstraint` subclass that overrides `-debugDescription` method. Once you get error message **_`Unable to simultaneously satisfy constraints.`_**, you will see nicely readable description of every constraint you have created. Example:
191+
192+
```objc
193+
"<KeepLayoutConstraint:0xc695560 left offset of <YourView 0xc682cf0> to <YourAnotherView 0xc681350> equal to 20 with required priority>",
194+
"<KeepLayoutConstraint:0xc695560 left offset of <YourView 0xc682cf0> to <YourAnotherView 0xc681350> equal to 50 with required priority>",
195+
```
196+
197+
With this you can very easily find the wrong attribute and fix it.
198+
199+
200+
---
201+
188202

189203
## Implementation Details
190204

@@ -206,7 +220,7 @@ See [`UIView+KeepLayout.m`][6] for details.
206220

207221

208222
---
209-
_Version 1.0.0_
223+
_Version 1.0.2_
210224

211225
MIT License, Copyright © 2013 Martin Kiss
212226

0 commit comments

Comments
 (0)