问题
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