Latest 0.0.1
Homepage https://github.com/PatrickSCLin/PLMenuBar
License MIT
Platforms tvos 9.0, requires ARC
Authors

PLMenuBar is a customized menubar for tvOS, simple and easy to use.

Snapshots

Desc View Combo View

Requirement

  • XCode 7.3

Support

  • Support desc detail view
  • Support combo detail view
  • Magic

Delegate

@objc public protocol PLMenuBarDelegate: NSObjectProtocol {

    func numberOfItemsInMenubar() -> Int;

    func menuBar(menuBar: PLMenuBarView, titleForItemAtIndex index: Int) -> String;

    optional func menuBar(menuBar: PLMenuBarView, detailItemForItemAtIndex index: Int) -> PLMenuDetailItem;

    optional func menuBar(menuBar: PLMenuBarView, didSelectItemAtIndex index: Int);

    optional func menuBar(menuBar: PLMenuBarView, didSelectDetailAtRow row: Int, Section section: Int, forItemAtIndex index: Int);

}

Usage

self.menuDetailItems = [
    PLMenuDetailDescItem(title: "TabBarItem with Desc", text: "Hello, World"),
    PLMenuDetailItem(title: "TabBarItem with Nothing"),
    PLMenuDetailComboItem(title: "TabBarItem with Combo", items: [
        PLMenuComboSection(title: "Section1", items: ["option1", "option2"], preferredIndex: 1),
        PLMenuComboSection(title: "Section2", items: ["option1", "option2"], preferredIndex: 0)
    ])
];

self.menuBar = PLMenuBarView();

self.menuBar.delegate = self;

self.view.addSubview(menuBar);

Latest podspec

{
    "name": "PLMenuBar",
    "version": "0.0.1",
    "summary": "PLMenuBar is a customized menubar for tvOS, simple and easy to use.",
    "homepage": "https://github.com/PatrickSCLin/PLMenuBar",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Patrick Lin": "[email protected]"
    },
    "platforms": {
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/PatrickSCLin/PLMenuBar.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "PLMenuBar/Info.plist",
        "PLMenuBar/PLBackdropView",
        "PLMenuBar/PLMenuBar.h",
        "PLMenuBar/PLMenuBarView.swift",
        "PLMenuBar/PLMenuDetailComboRowView.swift",
        "PLMenuBar/PLMenuDetailComboSectionView.swift",
        "PLMenuBar/PLMenuDetailComboView.swift",
        "PLMenuBar/PLMenuDetailDescView.swift",
        "PLMenuBar/PLMenuDetailView.swift",
        "PLMenuBar/Resources"
    ],
    "resources": "PLMenuBar/Resources/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This