Skip to content

Commit

Permalink
set index programmatically
Browse files Browse the repository at this point in the history
  • Loading branch information
0ber committed Apr 3, 2019
1 parent 9f2ccc9 commit ee81955
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AnimatedTabBarTest/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!--second-->
<scene sceneID="uNs-dt-lbn">
<objects>
<viewController id="8Gx-zg-Yyf" sceneMemberID="viewController">
<viewController id="8Gx-zg-Yyf" customClass="ViewController" customModule="AnimatedTabBarTest" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Bxh-cb-Uck">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -34,7 +34,7 @@
<!--first-->
<scene sceneID="A3E-dN-Em7">
<objects>
<viewController id="wZ9-4n-3dq" sceneMemberID="viewController">
<viewController id="wZ9-4n-3dq" customClass="ViewController" customModule="AnimatedTabBarTest" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="TTw-Tm-glE">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down
9 changes: 7 additions & 2 deletions AnimatedTabBarTest/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
(tabBarController as! RAMAnimatedTabBarController).isBottomLineShow = true
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

(tabBarController as! RAMAnimatedTabBarController).setSelectIndex(from: 0, to: 1)
}


}

0 comments on commit ee81955

Please sign in to comment.