LPPopupListView 是 iOS 中的一个自定义弹出组件,用于单选或多选的表格。
由 Luka Penger 创建 http://lukapenger.eu
如果您想使用 CocoaPods 将此组件作为 pod 包包含,只需在 Podfile 中添加以下行
pod "LPPopupListView"
LPPopupListView 使用 ARC(自动引用计数)。
如果您在非 ARC 项目中使用 LPPopupListView,则需要将所有 LPPopupListView 源文件设置 -fobjc-arc
编译器标志。
要在 Xcode 中设置编译器标志,请转到您的活动目标并选择“构建阶段”选项卡。现在选择所有 LPPopupListView 源文件,按 Enter 键,输入 -fobjc-arc
,然后“完成”以禁用 LPPopupListView 的 ARC。
- (void)popupListView:(LPPopupListView *)popupListView didSelectIndex:(NSInteger)index;
- (void)popupListViewDidHide:(LPPopupListView *)popupListView selectedIndexes:(NSIndexSet *)selectedIndexes;
#pragma mark - LPPopupListViewDelegate
- (void)popupListView:(LPPopupListView *)popUpListView didSelectedIndex:(NSInteger)index
{
NSLog(@"popUpListView - didSelectIndex: %d", index);
}
- (void)popupListViewDidHide:(LPPopupListView *)popupListView selectedIndexes:(NSIndexSet *)selectedIndexes
{
NSLog(@"popupListViewDidHide - selectedIndexes: %@", selectedIndexes.description);
}
此代码根据 MIT 许可证的条款和条件分发。
在每个 LPPopupListView 版本上,可以找到关于每个版本的简要总结在此。