环绕型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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。