一,效果图。

二,工程图。

三,代码。

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. HT For Web 拓扑图背景设置

    HT For Web 的HTML5拓扑图组件graphView背景设置有多种途径可选择: divBackground:通过css设置graphView对应的div背景 Painter:通过graphV ...

  2. noip 模拟赛 匹配 //贪婪策略

    匹配(match.pas/match.c/match.cpp) [题目描述] 到了新的学期,Mcx痛苦的发现通用技术课居然是有实验课的,这样的话他就不得不放弃写作业的想法而去做一件类似于搭积木的事情. ...

  3. for of 与 for in的区别

    遍历数组通常使用for循环,ES5的话也可以使用forEach,ES5具有遍历数组功能的还有map.filter.some.every.reduce.reduceRight等,只不过他们的返回结果不一 ...

  4. C# 读写App.config配置文件的方法

    我们经常会希望在程序中写入一些配置信息,例如版本号,以及数据库的连接字符串等.你可能知道在WinForm应用程序中可以利用Properties.Settings来进行类似的工作,但这些其实都利用了Ap ...

  5. Firemonkey 指定 StringGrid 只能上下滾动,不要左右滚动

    要使 StringGrid 只能上下滚动,不要左右滚动,只要加入下面代码即可: StringGrid1.AniCalculations.TouchTracking := [ttVertical]; p ...

  6. java servlet调用带有多个返回结果集的存储过程

    一.mysql存储过程 这里我先说下我这个功能实现的逻辑及途中遇到的一些问题.这个存储过程一共带两个输入参数,一共关联到两张表的查询,每个参数都对应查询表中的一个判断,所以一共返回了两个结果集(当然要 ...

  7. 算法实质【Matrix67】

    动态规划 :你追一个MM的时候,需要对该MM身边的各闺中密友都好,这样你追MM这个问题 就分解为对其MM朋友的问题,只有把这些问题都解决了,最终你才能追到MM. 因此,该问题适用于聪明的MM,懂得“看 ...

  8. 三星s4刷机教程(卡刷)

    ···············使用到的工具···················手机助手(--推荐91助手).root精灵.Odin3 v3.07.recovery包.rom包 1.首先在电脑上安装9 ...

  9. Maven+Spring+Spring MVC+MyBatis+MySQL,搭建SSM框架环境

    项目建设完成之后的结构: 数据库的表结构如下: 环境建设:搭建Maven环境.Tomcat环境.需要MySql 数据库支持,使用的编程工具Eclipse (这些是前期准备): 开始创建工程: 1.创建 ...

  10. 基于HTML5 geolocation 实现的天气预报功能

    最近一直在学习HTML5,因为8月份要开发手机项目了.所以先把HTML5学习下. 基本思路: 1. 用户未设置任何城市之前,根据HTML5 geolocation 获取用户所在的地理位置. 2. 根据 ...