环绕型button

程序名称:环绕型button

授权协议: Public Domain

操作系统: iOS

开发语言: Objective-C

环绕型button 介绍

环绕型按钮,可以当做菜单。点击某个按钮,所有按钮会整体移动,被点击的按钮会移动到最顶端。

作者说:可以自行修改代码,但是使用必须实现这些:

CircularLayOutView *manger=[[CircularLayOutView alloc] init];

//manger.tager=self;

manger.MyDelegate=self;

XYPoint *centerPoint=[[XYPoint alloc] init];

centerPoint.xPoint=160;

centerPoint.yPoint=230;

manger.centerPoint=centerPoint;

XYPoint *buttonWeightAndHeight=[[XYPoint alloc] init];

buttonWeightAndHeight.xPoint=40;

buttonWeightAndHeight.yPoint=40;

manger.buttonWeightAndHeight=buttonWeightAndHeight;

manger.radius=100;

NSArray *buttonNameArray=@[@“按钮1”,@“按钮2”,@“按钮3”,@“按钮4”,@“按钮5”,@“按钮6”];

NSMutableArray *imageArr=[[NSMutableArray alloc] initWithCapacity:0];

for (int i=0; i
if(i>8)

{

i=8;

}

[imageArr addobject:[UIImage imageNamed:[Nsstring
stringWithFormat:@“%d.png”,i]]];

}

manger.buttonCount=6;

manger.buttonIndexNameArray=buttonNameArray;

manger.buttonIndexBackGroundarray=imageArr;

[manger creatUIToView:self.view target:nil];

[self.view addSubview:manger];

小编注:感谢作者@joser_君赏 分享代码于Code4App。

环绕型button 官网

http://code4app.com/codesample/51e411cd6803fa5f32000000

相关编程语言

Acapela TTS 是一个为 iPhone 和 iPad 开发的 TTS 引...
二维码(QR Code)扫描静态库,扫描效率较高。
RegexKitLite 是一个轻量级的 Objective-C 的正则表...
一款基于ASIHttpReques开源的仿迅雷多线程断点续传功...
实现动态检测网络(wifi)状况,不需要用户手动刷新...
使用iphoneSDK官方NSXMLParserDelegate做的简单xml解...