| | |
| | | pageMenu.dividingLineHeight = 1 |
| | | |
| | | // item |
| | | pageMenu.spacing = 20.0 |
| | | pageMenu.permutationWay = .notScrollEqualWidths |
| | | pageMenu.setItems(["限时折扣","赠送课时"], selectedItemIndex: 0) |
| | | |
| | | // 字体 |
| | | pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 14, weight: .semibold) |
| | | pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 14,weight: .medium) |
| | | pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 16, weight: .semibold) |
| | | pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 16,weight: .medium) |
| | | // 颜色 |
| | | pageMenu.selectedItemTitleColor = .black.withAlphaComponent(0.8) |
| | | pageMenu.unSelectedItemTitleColor = .black.withAlphaComponent(0.6) |
| | |
| | | } |
| | | |
| | | override func setUI() { |
| | | pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9, width: JQ_ScreenW, height: 45) |
| | | pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 5, width: JQ_ScreenW, height: 45) |
| | | pageMenu.layer.shadowColor = UIColor(hexStr: "#EFEEEE").withAlphaComponent(0.5).cgColor |
| | | pageMenu.layer.shadowOffset = CGSize(width: 0, height: 2) |
| | | pageMenu.layer.shadowOpacity = 1 |
| | |
| | | view.insertSubview(pageViewController.view, at: 0) |
| | | pageViewController.didMove(toParent: self) |
| | | |
| | | pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9 + 45, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 9 - 45) |
| | | pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 5 + 45, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 5 - 45) |
| | | } |
| | | } |
| | | |