Update table view data based on row component selected in picker view

梦想与她 提交于 2019-12-11 04:33:36

问题


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 :)


回答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 :)



来源:https://stackoverflow.com/questions/8633426/update-table-view-data-based-on-row-component-selected-in-picker-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!