【代码笔记】iOS-点击一个button,出6个button
一,效果图。
二,工程图。
三,代码。
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的更多相关文章
- 【代码笔记】iOS-点击一个按钮会出现多个按钮的动画效果
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...
- 【代码笔记】iOS-点击顶点处,弹出另一个小的界面
一,效果图. 二,文件目录. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewControlle ...
- jQuery 学习笔记2 点击时弹出一个对话框
上次学习的是页面加载完成后弹出一个警告框,这里我们改为当用户点击后弹出一个警告框. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans ...
- 【代码笔记】iOS-点击搜索按钮,或放大镜后都会弹出搜索框
一, 效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import "CLHSearchBar.h ...
- 【代码笔记】iOS-点击任何处,显示出红色的UIView
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> //头文件 #import "MoreView. ...
- 【代码笔记】iOS-点击搜索跳转到另外一个页面
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...
- 【代码笔记】iOS-点击城市中的tableView跳转到旅游景点的tableView,下面会有“显示”更多。
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...
- 【代码笔记】iOS-点击cell时候的动画翻转
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...
- 【代码笔记】iOS-点击任何处,出现城市
一,效果图. 二,工程目录. 三,代码. //点击任何处,出现城市 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { ...
随机推荐
- .NET Core中使用Razor模板引擎
一.简介 在MVC以外的场景中,我们往往需要完成一些模板引擎生成代码或页面的工作:在以前我们一般常用的有Razor.NVeocity.VTemplate.虽然所有的模板系统都具有一些共同特征,但 Ra ...
- 【Swift学习】Swift编程之旅---可选链(二十一)
可选链Optional Chaining是一种可以在当前值可能为nil的可选值上请求和调用属性.方法及下标的方法.如果可选值有值,那么调用就会成功:如果可选值是nil,那么调用将返回nil.多个调用可 ...
- angularjs中的页面访问权限设置
11月在赶一个项目,这阵子比较忙,挤挤时间更一篇博客吧,如标题所述说说在ng中页面访问权限控制的问题,水平有限各位看官见谅: 在以往的项目中,前后端常见的配合方式是前端提供页面和ui加一点DuangD ...
- 音频文件解析(二):WAV格式文件波形绘制
解析WAV头部信息后,接下来就可以根据相关参数和DATA块数据绘制波形. 1.重新编码(转换为8bits,单声道数据) Public Function GetFormatData(ByVal pDat ...
- 常用的 SQL语句------CRUD
复习之前课本上的sql语句,以前上课的时候都是老师在上面讲,我们在下面玩,根本没有把这个放在心上,等到考试的时候临时学习突击下,就可以顺利过60了,但是现在不行了,自己要重新的学习sql,应该把里面最 ...
- 浅谈Jquery中的bind(),live(),delegate(),on()绑定事件方式
前言 因为项目中经常会有利用jquery操作dom元素的增删操作,所以会涉及到dom元素的绑定事件方式,简单的归纳一下bind,live,delegate,on的区别,以便以后查阅,也希望该文章日后能 ...
- 【原创】Kakfa message包源代码分析
笔者最近在研究Kafka的message包代码,有了一些心得,特此记录一下.其实研究的目的从来都不是只是看源代码,更多地是想借这个机会思考几个问题:为什么是这么实现的?你自己实现方式是什么?比起人家的 ...
- 基于MVC4+EasyUI的Web开发框架经验总结(6)--在页面中应用下拉列表的处理
在很多Web界面中,我们都可以看到很多下拉列表的元素,有些是固定的,有些是动态的:有些是字典内容,有些是其他表里面的名称字段:有时候引用的是外键ID,有时候引用的是名称文本内容:正确快速使用下拉列表的 ...
- WebApp简单制作(后端也可以装逼啦)
前端越来越吃香的感觉 年后回来,跟之前和几个同事和朋友聊天,发现有两个.net的和一个php的朋友都转到了前端,真是出乎意料.自从之前的webapp兴起后,前端感觉比后端吃香很多,总结朋友们转的原因, ...
- Chrome的ERR_UNSAFE_PORT解决办法
今天早上来上班照往常一样,打开我的VS,编译运行程序,打不开??又是一阵调试,断点,很快我发现不是我的程序问题,因为在IE,Firefox里都可以正常打开,唯独Chrome报错.又仔细看了下报错页面, ...