AccordionView 0.0.5

AccordionView 0.0.5

测试已测试
语言语言 Obj-CObjective C
许可证 Apache 2
发布最新发布2014年12月

Wojtek Siudzinski 维护。




  • 作者:
  • Wojtek Siudzinski

Cocoa Touch 中的一个非常简单的手风琴视图。

用法

AccordionView *accordion = [[AccordionView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)];
[self addSubview:accordion];

// Only height is taken into account, so other parameters are just dummy
UIButton *header1 = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 0, 30)];
[header1 setTitle:@"First row" forState:UIControlStateNormal];

UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 200)];
// ... add subviews to view1

[accordion addHeader:header1 withView:view1];

// ... add more panels

[accordion setNeedsLayout];

// Set this if you want to allow multiple selection
[accordion setAllowsMultipleSelection:YES];

// Set this to NO if you want to have at least one open section at all times
[accordion setAllowsEmptySelection:YES];

// Remove section at index 1
[accordion removeHeaderAtIndex:1];

待办事项

  • 水平视图

许可证

版权所有 (C) 2011-2014 Wojtek Siudzinski [email protected]Appsome

受 Apache 许可证 2.0 版本许可: https://apache.ac.cn/licenses/LICENSE-2.0