-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCRadialMenuView.h
59 lines (42 loc) · 1.56 KB
/
CCRadialMenuView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// CCRadialMenu.h
// RadialEx
//
// Created by Charles Circlaeys on 29/01/2014.
// Copyright (c) 2014 Charles Circlaeys. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CCRadialButtonView.h"
typedef enum
{
CCRadialErrorRadiusCollision,
CCRadialErrorSizeMax
} CCRadialError;
typedef enum
{
CCRadialAnimationFromCenter,
CCRadialAnimationNone
} CCRadialAnimation;
@class CCRadialMenuView;
@protocol CCRadialMenuViewDataSource <NSObject>
- (NSInteger)numberOfButtonsForRadialMenuView:(CCRadialMenuView *)radialMenuView;
- (UIView *)radialMenuView:(CCRadialMenuView *)radialMenuView buttonForIndex:(NSInteger)index;
@end
@protocol CCRadialMenuViewDelegate <NSObject>
- (CGSize)radialButtonSizeForRadialMenuView:(CCRadialMenuView *)radialMenuView;
- (void)radialMenuView:(CCRadialMenuView *)radialMenuView didSelectViewAtIndex:(NSInteger)index;
@optional
- (void)radialMenuView:(CCRadialMenuView *)radialMenuView didFailToDisplayForError:(CCRadialError)error;
- (void)radialMenuView:(CCRadialMenuView *)radialMenuView didChangeRadius:(CGFloat)radius;
@end
@interface CCRadialMenuView : UIView
@property (nonatomic, weak) id <CCRadialMenuViewDataSource> dataSource;
@property (nonatomic, weak) id <CCRadialMenuViewDelegate> delegate;
@property (nonatomic, strong) UIView *backgroundView;
@property (nonatomic, assign) CCRadialAnimation animation;
@property (nonatomic, assign) CGFloat offset;
@property (nonatomic, assign) BOOL shouldDisplayOnRadiusCollision;
@property (nonatomic, readonly) CGFloat currentRadius;
- (void)reloadData;
- (void)display;
@end