简体   繁体   English

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

[英]Update table view data based on row component selected in picker view

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 我有一个应用程序,我需要在一个页面中保存一个提醒,在其他页面中显示保存的提醒。我已经使用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 在查看提醒页面中,用户将有3个选项可供查看,查看我已实施的所有选项,每月查看包含12个月的选择器视图的查看者,查看组

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: 我找到了用于检索特定月份中所有提醒的查询,例如12月份,我使用以下查询进行了检索:

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). 进入查看月度页面(控制器)之前,有一个前面提到的月选择器视图,我知道我们可以有单独的视图控制器页面来显示12个月的数据,但是代码变得很忙。因此,我想要表格视图可根据选择器视图(行组件)中选择的月份自动更新。

How can I do this,can any one please help me out with your valuable suggestions! 我该怎么做,任何人都可以帮我解决您的宝贵建议!

Thanks all in advance :) 提前谢谢大家:)

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 :) 谢谢你们 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM