Code Monkey home page Code Monkey logo

lycircleview's Introduction

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.

lycircleview's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

carabina gbw-99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.