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.
-
Download
LYCircleView
, addLYCircleView
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.
Download LYCircleView, and add LYCircleView
file to your project.
pod 'LYCircleView', '~>0.0.1'
Then, run the following command:
$ pod install
Enjoy.
LYCircleView *circleView = [[LYCircleView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
[self.view addSubview:circleView];
Inherit LYCircleViewDelegate
protocol.
circleView.delegate = self;
and implement protocol.
- circleView: didClickedItem:
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 usenormalAssets
. -
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
LYCircleView is released under the MIT license. See LICENSE for details.