基于圆弧和控制元素的选择数量(类似于比萨饼)。
请参考示例以获取更深入的示例或查看源代码。
[rosettaView setActionBlock:^(NORVView *view, NSUInteger selectedIndex) {
[view setSelectedIndex:selectedIndex];
[weakSelf updateView:view withSelectedIndex:selectedIndex];
}];
[rosettaView setSelectedIndex:selectedIndex];
[rosettaView setLeaves:@[leaf1, leaf2, leaf3]];
[rosettaView setStartAngle:45.f];
[rosettaView setTotalAngle:90.f];
[rosettaView setMarginAngle:5.f];
[rosettaView setThickness:70.f];
[rosettaView setShadowWidth:5];
[rosettaView setShadowColor:[UIColor blackColor]];
[NORVLeaf rosettaLeafWithColor:[UIColor grayColor]
selectedColor:[UIColor blackColor]
circleTextView:[NORVCircleTextView rosettaCircleText:@"Button" withTextAttributes:nil]];
[leaf setColor:[UIColor blackColor]];
[leaf setSelectedColor:[UIColor blackColor]];
[leaf.circleTextView setTextAttributes:(i == selectedIndex) ? selectedTextAttributes : textAttributes];
继承自 XMCircleTypeView(归功于: XMCircleType)。用于在叶子显示文本。
[NORVCircleTextView rosettaCircleText:NSLocalizedString(@"Quite Long Button", nil)
withTextAttributes:nil];
在项目的git文件夹中输入:
git submodule init
git submodule add --copy link to the repo--
git submodule update
将NORosettaView/RosettaView文件夹中的所有文件复制下来。
这强烈不建议,因为您将无法查看代码更新。克隆或下载源代码,将NOCategories文件夹中的所有文件复制下来。
Natalia Osiecka,[email protected]
在Apache 2.0许可证下可用。有关更多信息,请参阅LICENSE文件。
需要Xcode 6,目标iOS 6.0或更高版本。