根据选择器视图中选择的行组件更新表视图数据

发布于 2024-12-23 05:47:36 字数 507 浏览 0 评论 0原文

我有一个应用程序,我需要在一个页面中保存提醒,并在其他页面中显示保存的提醒。我已经使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文