一,效果图。

二,工程图。

三,代码。

RootViewController.h

#import <UIKit/UIKit.h>
//加入头文件
#import "DCPathButton.h" @interface RootViewController : UIViewController
<DCPathButtonDelegate> @end

RootViewController.m

#import "RootViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
} - (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view. self.view.frame = CGRectMake(0, 0, 320, 460);
self.view.backgroundColor = [UIColor whiteColor];
DCPathButton *dcPathButton = [[DCPathButton alloc]
initDCPathButtonWithSubButtons:6
totalRadius:60
centerRadius:15
subRadius:15
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_1" withTag:5];
}
subImageBackground:nil
inLocationX:0 locationY:0 toParentView:self.view];
dcPathButton.delegate = self; }
#pragma mark - DCPathButton delegate
- (void)button_0_action{
NSLog(@"Button Press Tag 0!!");
} - (void)button_1_action{
NSLog(@"Button Press Tag 1!!");
} - (void)button_2_action{
NSLog(@"Button Press Tag 2!!");
} - (void)button_3_action{
NSLog(@"Button Press Tag 3!!");
} - (void)button_4_action{
NSLog(@"Button Press Tag 4!!");
} - (void)button_5_action{
NSLog(@"Button Press Tag 5!!");
} - (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

【代码笔记】iOS-点击一个button,出6个button的更多相关文章

  1. 【代码笔记】iOS-点击一个按钮会出现多个按钮的动画效果

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  2. 【代码笔记】iOS-点击顶点处,弹出另一个小的界面

    一,效果图. 二,文件目录. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewControlle ...

  3. jQuery 学习笔记2 点击时弹出一个对话框

    上次学习的是页面加载完成后弹出一个警告框,这里我们改为当用户点击后弹出一个警告框. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans ...

  4. 【代码笔记】iOS-点击搜索按钮,或放大镜后都会弹出搜索框

    一, 效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import "CLHSearchBar.h ...

  5. 【代码笔记】iOS-点击任何处,显示出红色的UIView

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> //头文件 #import "MoreView. ...

  6. 【代码笔记】iOS-点击搜索跳转到另外一个页面

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  7. 【代码笔记】iOS-点击城市中的tableView跳转到旅游景点的tableView,下面会有“显示”更多。

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  8. 【代码笔记】iOS-点击cell时候的动画翻转

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  9. 【代码笔记】iOS-点击任何处,出现城市

    一,效果图. 二,工程目录. 三,代码. //点击任何处,出现城市 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { ...

随机推荐

  1. Moon.Orm 5.0(MQL版)使用指南及代码生成器新版发布

    相关博文1)Moon.Orm 5.0 (MQL版) 配置说明; 2)Moon.Orm 5.0 (MQL版) 版本维护及下载(跟踪发布); 3)Moon.Orm 5.0系列文章;  4)Moon.Orm ...

  2. linux中不小心将rpm命令卸载了,怎么恢复?

    今天在搭建mysql的集群服务时,安装mysql集群服务前,先卸载原来mysql的软件包,不小心将rpm的命令也给卸载掉了,这下惨了,什么也做不了了.在google了翻了好多个页面,甚至官网也看了,没 ...

  3. EF基本操作增、删、查、改、分页,join……等

    一.批量添加数据 static void Main(string[] args) { add(); add2(); Console.ReadKey(); } static void add() { D ...

  4. 【转载】Visaul Studio 常用快捷键的动画演示

    在进行代码开发的时候,我们往往会频繁的使用键盘.鼠标进行协作,但是切换使用两种工具会影响到我们的开发速度,如果所有的操作都可以只用键盘来完成,那开发效率将得到大幅度的提升.因此,灵活地应用 Visua ...

  5. JQuery新闻滚动的实现方法(常用笔记1)

    .mouseover() //经过子元素也会触发 .mouseenter() //经过被选元素才会触发 .mouseout() //离开子元素也会触发 .mouseleave() //离开被选元素才会 ...

  6. 从C#到Objective-C,循序渐进学习苹果开发(2)--Objective-C和C#的差异

    本随笔系列主要介绍从一个Windows平台从事C#开发到Mac平台开发苹果开发的一系列感想和体验历程,本系列文章是在起步阶段逐步积累的,希望带给大家更好,更真实的转换历程体验. 在上篇<从C#到 ...

  7. SignalR入门之基本介绍

    SignalR是微软对web开发技术的扩充,它是一种框架,方便用来创建实时应用程序. 有一些即时消息系统,实时协作工作集,多人在线游戏,信息广播服务等其他需要在信息产生时就能进行发送的任务系统. 对于 ...

  8. 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流

    [源码下载] 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流 作者:webabcd 介绍不可或缺 Windows Native 之 C++ 标准输 ...

  9. Firemonkey 载入 Style 皮肤 (*.fsf 二进制文件) 速度测试

    说明:Firemonkey 可以换肤是一大亮点,但使用它必须要付出一点代价,就是需要一点载入的时间,下面以 *.fsf 二进制文件来做载入测试,有兴趣可以参考看看. 开发:XE8 for iOS 皮肤 ...

  10. Yii2框架打包成Phar包报错的经历

    以yii2为例 打包文件过程比较简单,但打包好以后简单测试yii命令,一直报错: PHP Fatal error: Uncaught yii\base\InvalidParamException: T ...