#import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
#import <UIKit/UIKit.h> #import "DCPathButton.h" @interface ViewController : UIViewController<DCPathButtonDelegate> @end
- (void)viewDidLoad { [super viewDidLoad]; self.view.frame = CGRectMake(0, 0, 320, 560); self.view.backgroundColor = [UIColor whiteColor]; DCPathButton *dcPathButton = [[DCPathButton alloc] initDCPathButtonWithSubButtons:6 totalRadius:80 centerRadius:25 subRadius:25 centerImage:@"custom_center" centerBackground:nil subImages:^(DCPathButton *dc){ [dc subButtonImage:@"custom_1" withTag:0]; [dc subButtonImage:@"custom_2" withTag:1]; [dc subButtonImage:@"custom_3" withTag:2]; [dc subButtonImage:@"custom_4" withTag:3]; [dc subButtonImage:@"custom_5" withTag:4]; [dc subButtonImage:@"custom_6" withTag:5]; } subImageBackground:nil inLocationX:0 locationY:0 toParentView:self.view]; dcPathButton.delegate = self; }
self.view.frame = CGRectMake(0, 0, 320, 560);
subImages:^(DCPathButton *dc){ [dc subButtonImage:@"custom_1" withTag:0]; [dc subButtonImage:@"custom_2" withTag:1]; [dc subButtonImage:@"custom_3" withTag:2]; [dc subButtonImage:@"custom_4" withTag:3]; [dc subButtonImage:@"custom_5" withTag:4]; [dc subButtonImage:@"custom_6" withTag:5]; }
#pragma mark - DCPathButton delegate - (void)button_0_action{ NSLog(@"Menu 0 Click"); }
#pragma mark - DCPathButton delegate - (void)button_0_action{ NSLog(@"Menu 0 Click"); } - (void)button_1_action{ NSLog(@"Menu 1 Click"); }