###Podfile
platform :ios, '8.4'
pod "FCSideBar", "~> 1.0.0"
###How to use 使用方式
- Please declare
FCAnimationNavigationController
and call[[FCAnimationNavigationController alloc] init]
. - Put controllers into
fcAnimationNavigationController.customViewControllers
. - Set each
sideBarName
of controller. - present to
fcAnimationNavigationController
. - There will be a sideBarName list on sideBar, selecting the name will switch to corresponding controller.
- 請宣告一個FCAnimationNavigationController,並使用
[[FCAnimationNavigationController alloc] init]
。 - 將欲加入的controller放入
fcAnimationNavigationController.customViewControllers
這個陣列。 - 設定每個controller的
sideBarName
。 - 將controller present到
fcAnimationNavigationController
。 - sideBar上的列表就會有相對應的名字,點選對應的名字即可切換到對應的controller。
Here is sample code 以下為範例程式碼:
self.fcAnimationOneController = [[FCAnimationOneController alloc] init];
self.fcAnimationOneController.sideBarName = @"ControllerOne";
self.fcAnimationTwoController = [[FCAnimationTwoController alloc] init];
self.fcAnimationTwoController.sideBarName = @"ControllerTwo";
self.fcAnimationThreeController = [[FCAnimationThreeController alloc] init];
self.fcAnimationThreeController.sideBarName = @"ControllerThree";
self.fcAnimationNavigationController.customViewControllers = @[self.fcAnimationOneController, self.fcAnimationTwoController, self.fcAnimationThreeController];
##Warning
Controller that you want to put in customViewControllers must inherit FCBaseController.
controller.view have been setted FCAnimationBaseView.
Please use [controller.view addSubView:your customized view] if you want to set your customized view
Please make sure your "View controller-based status bar appearance" have setted "NO" in Info.plist if your StatusBar does not animate to hidden.
##注意
欲加入controller需繼承於FCBaseController。
FCBaseController的view已經被設定為FCAnimationBaseView
如果要將controller的view設定成自己製作的view,請用[controller.view addSubView:自製的View]
如果你的StatusBar沒有往上退回,請確定Info.plist中"View controller-based status bar appearance"的值是NO
##Customized
Customize backgroundcolor of FCAnimationBaseView
- (void) setCustomSuperViewBackgroundColor:(UIColor*)customBackgroundColor;
Customize sidebarcell and background color in sidebar
Use FCCustomSideBarCellDelegate
FCCustomSideBarCellDelegate
- (FCNavigationViewCell*) fcCustomView:(UITableView*)customView fcCustomSideBarCellAtRow:(NSInteger)cellRow;
- (UIColor*) fcCustomViewColor;
##客製化
客製化FCAnimationBaseView
的backgroundcolor
- (void) setCustomSuperViewBackgroundColor:(UIColor*)customBackgroundColor;
客製化Sidebarcell與Sidebar的背景顏色
使用FCCustomSideBarCellDelegate
FCCustomSideBarCellDelegate
- (FCNavigationViewCell*) fcCustomView:(UITableView*)customView fcCustomSideBarCellAtRow:(NSInteger)cellRow;
- (UIColor*) fcCustomViewColor;