1
我想要導航欄擴展中的這兩個菜單,並在滾動時隱藏除擴展名外的導航欄。頁面菜單,滾動時隱藏導航欄
我是能夠實現的菜單與PageMenu「PageMenu」和隱藏的導航欄,通過AMScrollingNavbar
但我現在面臨的問題是導航欄皮,但意見不動了導航欄
func loadControllers(){
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let topViewController = storyboard.instantiateViewControllerWithIdentifier("TopNewsController") as!
TopNewsController
topViewController.title = "TOP"
controllerArray.append(topViewController)
let briefViewController = storyboard.instantiateViewControllerWithIdentifier("BriefViewController") as!
BriefViewController
briefViewController.title = "BRIEFS"
controllerArray.append(briefViewController)
let videoViewController = storyboard.instantiateViewControllerWithIdentifier("VediosViewController") as!
VediosViewController
videoViewController.title = "VIDEOS"
controllerArray.append(videoViewController)
// Customize menu
parameters = [
.ScrollMenuBackgroundColor(UIColor.navigationBarColor()),
.ViewBackgroundColor(UIColor(red: 20.0/255.0, green: 20.0/255.0, blue: 20.0/255.0, alpha: 1.0)),
.SelectionIndicatorColor(UIColor.whiteColor()),
.BottomMenuHairlineColor(UIColor(red: 70.0/255.0, green: 70.0/255.0, blue: 80.0/255.0, alpha: 1.0)),
.MenuItemFont(UIFont(name: "HelveticaNeue-Bold", size: 14.0)!),
.MenuHeight(expressTribuneUtilities.convertIphone6ToIphone5(48)),
.MenuItemWidth(90.0),
.CenterMenuItems(true)
]
AppDelegate.getInstatnce().nav = self.navigationController as! ScrollingNavigationController
AppDelegate.getInstatnce().nav.scrollingNavbarDelegate = self
// Initialize scroll menu
pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0.0, 64.0, self.view.frame.width, self.view.frame.height), pageMenuOptions: parameters)
self.view.addSubview(pageMenu!.view)
}
呼叫從類這就是滾動方法在菜單
AppDelegate.getInstatnce().nav.followScrollView(tableMainView, delay: 0.5)
在最後一行是什麼'self.view'。 –