根据选择器视图中选择的行组件更新表视图数据
我有一个应用程序,我需要在一个页面中保存提醒,并在其他页面中显示保存的提醒。我已经使用 sqlite3 成功完成了它
在查看提醒页面中,用户将有 3 个选项可以查看,查看我拥有的所有选项已经实现,每月查看包含 12 个月的选择器视图,查看组
我已经找到了用于检索特定月份中所有提醒的查询,例如 12 月,我已使用以下查询进行检索:
NSString *sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE Date BETWEEN '2012-12-01' AND '2012-12-31'"];
在进入查看每月之前页面(控制器),正如我之前提到的,有一个月份选择器视图,我知道我们可以有单独的视图控制器页面来显示 12 个月的数据,但代码变得很繁忙。因此我希望更新表视图自动基于选择器视图(行组件)中选择的月份。
我该如何做到这一点,请任何人帮我提供宝贵的建议!
预先感谢大家:)
I have an app,where I need to save a reminder in one page and in other display the saved reminder.I have done it successfully using sqlite3
In the view reminder page,the user would have 3 options to view,view all which I have already implemented,view monthly that contains picker view with 12 months,view group
I have found out the query for retrieving all the reminders in a particular month,say for month december,I have retrieved using the following query:
NSString *sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE Date BETWEEN '2012-12-01' AND '2012-12-31'"];
Before entering in to view monthly page(controller),there is a month picker view as I have mentioned earlier,I know that we can have separate view controller pages for displaying the data of 12 months,but the code becomes hectic.Hence I want the table view to get updated automatically based on month selected in picker view(row component).
How can I do this,can any one please help me out with your valuable suggestions!
Thanks all in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在以下链接中找到了问题的答案:
获取不同视图中存在的选择器视图的选定值,并在其他视图中使用该字符串
谢谢大家:)
I found out the answer for the question in the following link:
Get selected value of a picker view that is present in different view and use the string in some other view
Thank you all :)