# PageMenuHiKit **Repository Path**: zero-time/PageMenuHiKit ## Basic Information - **Project Name**: PageMenuHiKit - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-06-07 - **Last Updated**: 2021-06-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PageMenuHiKit [![CI Status](https://img.shields.io/travis/Hoa/PageMenuHiKit.svg?style=flat)](https://travis-ci.org/Hoa/PageMenuHiKit) [![Version](https://img.shields.io/cocoapods/v/PageMenuHiKit.svg?style=flat)](https://cocoapods.org/pods/PageMenuHiKit) [![License](https://img.shields.io/cocoapods/l/PageMenuHiKit.svg?style=flat)](https://cocoapods.org/pods/PageMenuHiKit) [![Platform](https://img.shields.io/cocoapods/p/PageMenuHiKit.svg?style=flat)](https://cocoapods.org/pods/PageMenuHiKit) ## Example To run the example project, clone the repo, and run `pod install` from the Example directory first. ## Requirements ## Installation PageMenuHiKit is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby pod 'PageMenuHiKit' ``` ## Author Hoa, 38417867+zero-times@users.noreply.github.com ## License PageMenuHiKit is available under the MIT license. See the LICENSE file for more info. ## Usage ```Swift var controllers: [UIViewController] = [] for month in ["关注","名人","名馆名店"] { let viewController = DViewController() viewController.title = month controllers.append(viewController) } var pages: [UIViewController] = [] for item in ["热门", "鉴定直播", "授权直播", "短视频"] { let vc = DViewController() vc.title = item pages.append(vc) } let iconBgColor = UIColor(red: 0xF7/255.0, green: 0xF8/255.0, blue: 0xF9/255.0, alpha: 1) let heightColor = UIColor(red: 0xCA/255.0, green: 0x26/255.0, blue: 0x26/255.0, alpha: 1) let height333Color = UIColor(red: 0x33/255.0, green: 0x33/255.0, blue: 0x33/255.0, alpha: 1) let iconDesign = PageMenuItemDesign(color: height333Color, selectedColor: .white, backgroundColor: iconBgColor, selectedBackgroundColor: heightColor, image: #imageLiteral(resourceName: "开通VIP"), selectedImage: #imageLiteral(resourceName: "gou-13备份"), font: .systemFont(ofSize: 13), selectedFont: .systemFont(ofSize: 13)) let nDesign = PageMenuItemDesign(color: height333Color, selectedColor: .white, backgroundColor: iconBgColor, selectedBackgroundColor: heightColor, font: .systemFont(ofSize: 13), selectedFont: .systemFont(ofSize: 13)) let page = PageMenuContainer(controllers: pages, menuStyle: .cornerRadiusButton, menuStyleDesign: nDesign, startIndex: 0, topBarHeight: 15, iconStyle: .iconButton, iconStyleDesign: iconDesign, iconIndex: 0) page.title = "直播" controllers.insert(page, at: 0) let statusBarHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height let menuDesign = PageMenuItemDesign(color: .gray, selectedColor: .black, font: .systemFont(ofSize: 16), selectedFont: .systemFont(ofSize: 18, weight: .medium)) var button = UIButton(type: .infoDark) if #available(iOS 13.0, *) { if #available(iOS 14.0, *) { button = UIButton(type: .contactAdd, primaryAction: UIAction.init() { _ in print("----") }) } else { // Fallback on earlier versions } } else { // Fallback on earlier versions } pageMenuController = PageMenuContainer(controllers: controllers, menuStyleDesign: menuDesign, topBarHeight: statusBarHeight, rightButton: button) pageMenuController?.delegate = self self.addChild(pageMenuController!) self.view.addSubview(pageMenuController!.view) pageMenuController?.didMove(toParent: self) ```