Latest 0.0.1
Homepage https://github.com/liaoyuanng/LYCircleView
License MIT
Platforms ios 7.0, requires ARC
Authors

LYCircleView

LYCircleView is a common fan-shaped menu, often used for remote control. LYCircleView provides some commonly used functions and you can custom UI by yourself.

Get Started

  • Download LYCircleView, add LYCircleView file to your project.
  • import LYCircleView. Just one line of code。

    LYCircleView *circleView = [[LYCircleView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
    [self.view addSubview:circleView]; // Emmmm...this can not be counted.😌
  • Enjoy.

Installation

Manual

Download LYCircleView, and add LYCircleView file to your project.

CocoaPods

Podfile

pod 'LYCircleView', '~>0.0.1'

Then, run the following command:

$ pod install

Enjoy.

Usage

create a circle menu

LYCircleView *circleView = [[LYCircleView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
[self.view addSubview:circleView];

handle events

Inherit LYCircleViewDelegate protocol.

circleView.delegate = self;

and implement protocol.

- circleView: didClickedItem:

custom

Maybe, you need custom UI by yourself. LYCirlceView provides some attributes.

  • normalAsset/normalAssets

    Set menu items image.This two properties have the same effect. normalAsset is convenient property. It will affect all items. When you want to set a different image for each item, you can use normalAssets.

  • selectedAsset/selectedAssets

    Set global/single item selected state image.

  • highlightAsset/highlightAssets

    Set global/single item highlight state image.

  • backgroundColor/backgroundColors

    Set global/single item background color.

  • itemInsert

    Set spacing between each item.

NOTE: normalAsset/normalAssets, selectedAsset/selectedAssets, highlightAsset/highlightAssets can accept UIImage or UIColor objects. see more in demo

Demo Screenshot

License

LYCircleView is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "LYCircleView",
    "version": "0.0.1",
    "summary": "A common fan menu for pages such as remote controls",
    "homepage": "https://github.com/liaoyuanng/LYCircleView",
    "license": "MIT",
    "platforms": {
        "ios": "7.0"
    },
    "authors": {
        "JuLiaoyuan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/liaoyuanng/LYCircleView.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "LYCircleView",
        "LYCircleView/**/*.{h,m}"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This