UIAtionSheet 与 UITableView
我需要一些关于 UIActionSheet 的建议。就我而言,我创建了一个 ActionSheet,在其中显示带有一些数据的 UITableView。
UIActionSheet *asheet = [[UIActionSheet alloc] init];
[asheet showInView:self.view];
[asheet setFrame:CGRectMake(0, 250, 320, 320)];
CustomView *innerView = [[CustomView alloc] initWithNibName:@"CustomView" bundle:nil];
innerView.view.frame = CGRectMake(0, 10, 320, 210);
[asheet addSubview:innerView.view];
CustomView 包含表。数据显示正确,它显示精确的 3 行,现在我想要一些类似的功能,例如:
(1) 当我单击任何行时,所选行应位于中心。
(2) 我应该在 CustomView 或 ActionSheet 中的哪里添加按钮(完成、取消)?
(3) 单击“完成”按钮时如何获取所选行?
有什么建议吗?
谢谢..
I need some suggestions about UIActionSheet. In my case I have created an ActionSheet in which I am displaying the UITableView with some data.
UIActionSheet *asheet = [[UIActionSheet alloc] init];
[asheet showInView:self.view];
[asheet setFrame:CGRectMake(0, 250, 320, 320)];
CustomView *innerView = [[CustomView alloc] initWithNibName:@"CustomView" bundle:nil];
innerView.view.frame = CGRectMake(0, 10, 320, 210);
[asheet addSubview:innerView.view];
the CustomView contains the table . Data is displaying properly, it displays exact 3 rows, now I want some similar functionality like :
(1) when I click on any row, the selected row should come at center.
(2) and where should I add buttons (done , cancel) in CustomView or in ActionSheet ?
(3) and how I get the selected row when I click on Done button?
any suggestions ?
Thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ActionSheetDataSource.h
CustomActionSheet.h
customActionsheet.m
CustomActionSheetView.h
CustomActionSheetView.m
现在您可以从任何视图调用所有这些,如下
exampleview.h
exampleview.m
CustomButton.h
#导入
自定义按钮.m
ActionSheetDataSource.h
CustomActionSheet.h
customActionsheet.m
CustomActionSheetView.h
CustomActionSheetView.m
Now you can call all this from any view as below
exampleview.h
exampleview.m
CustomButton.h
#import
CustomButton.m
(1)
请向我提供有关此问题的更多详细信息,我无法解决。
(2)
将它们添加到 UIActionSheet 中:
(3)
(1)
Kindly provide me with more details on this issue i can't get it right.
(2)
Add them in the UIActionSheet:
(3)