Skip to content

Commit 7a12242

Browse files
authored
Merge pull request #21 from emrepun/fix-18-layout-problems-for-ipad-and-in-general
Instead of setting constraints to child view controllers view, just confine it within parents bounds
2 parents 597aaa1 + 550d271 commit 7a12242

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

StickyTabBarViewController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Pod::Spec.new do |s|
1010

1111
s.name = 'StickyTabBarViewController'
12-
s.version = '0.0.4'
12+
s.version = '0.0.5'
1313
s.summary = 'A sticky and expandable view controller on top of TabBar'
1414

1515
s.description = <<-DESC

StickyTabBarViewController/Classes/ExpandableViewController.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ class ExpandableViewController: UIViewController {
8888
private func configureChildVC() {
8989
addChild(childVC)
9090
view.addSubview(childVC.view)
91-
childVC.view.topAnchor.constraint(equalTo: view.topAnchor, constant: 0.0).isActive = true
92-
childVC.view.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0.0).isActive = true
93-
childVC.view.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0.0).isActive = true
94-
childVC.view.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: 0.0).isActive = true
91+
childVC.view.frame = view.bounds
9592
childVC.didMove(toParent: self)
9693
}
9794

0 commit comments

Comments
 (0)