Skip to content

NSLayoutConstraint Usage Tweaks#105

Merged
fbartho merged 2 commits into
v0.8.0from
fb/constraint_tweaks
Sep 11, 2017
Merged

NSLayoutConstraint Usage Tweaks#105
fbartho merged 2 commits into
v0.8.0from
fb/constraint_tweaks

Conversation

@fbartho

@fbartho fbartho commented Sep 9, 2017

Copy link
Copy Markdown
Contributor
  • Move some constraint construction calls to their equivalent but simpler layoutAnchor forms
  • Move from directly manipulating isActive to using NSLayoutConstraint.activate()/deactivate() -- as per AppleDocs

Typically, using this method is more efficient than activating each constraint individually.

AppleDocs say these are typically faster than directly adjusting isActive
@codecov-io

codecov-io commented Sep 10, 2017

Copy link
Copy Markdown

Codecov Report

Merging #105 into v0.7.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           v0.7.0   #105   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          77     77           
=====================================
  Hits           77     77

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7ef4b7...dbcd70e. Read the comment docs.

@SD10 SD10 requested a review from nathantannar4 September 10, 2017 04:28
@SD10 SD10 changed the base branch from v0.7.0 to v0.8.0 September 10, 2017 12:45

@nathantannar4 nathantannar4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine if Apple Docs says its faster

@fbartho fbartho merged commit 51089cb into v0.8.0 Sep 11, 2017
@fbartho fbartho deleted the fb/constraint_tweaks branch September 11, 2017 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants