Skip to content

Commit

Permalink
scroll to top hacky but removing
Browse files Browse the repository at this point in the history
  • Loading branch information
jackthmp committed Dec 2, 2018
1 parent eea205f commit 3f66b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Recast/Controllers/TabBarController.swift
Expand Up @@ -61,7 +61,7 @@ class TabBarController: UITabBarController, UITabBarControllerDelegate {
let visibleViewController = navigationController.topViewController as? ViewController,
let scrollView = visibleViewController.mainScrollView,
visibleViewController == previousViewController {
let newOffset = CGPoint(x: 0, y: -visibleViewController.additionalSafeAreaInsets.top)
let newOffset = CGPoint(x: 0, y: visibleViewController.navBarType == .default ? -140 : -scrollView.adjustedContentInset.top)
scrollView.setContentOffset(newOffset, animated: true)
previousViewController = visibleViewController
} else {
Expand Down

0 comments on commit 3f66b1e

Please sign in to comment.