Skip to content

Instantly share code, notes, and snippets.

@steipete
Created January 6, 2015 22:14
Show Gist options
  • Select an option

  • Save steipete/5622e0a7e6dd60957a08 to your computer and use it in GitHub Desktop.

Select an option

Save steipete/5622e0a7e6dd60957a08 to your computer and use it in GitHub Desktop.

Revisions

  1. steipete created this gist Jan 6, 2015.
    7 changes: 7 additions & 0 deletions workaround.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    // This ensures that the automaticallyAdjustsScrollViewInsets magic works
    // On our newly added view controller as well.
    // This triggers _layoutViewController which then triggers
    // _computeAndApplyScrollContentInsetDeltaForViewController:
    // which finally updates our content inset of the scroll view (if any)
    // rdar://19053416
    [self.navigationController.view setNeedsLayout];