Hello All,
I have run into an issue with using the subject method call.
I have the following setup in my project:
Module 1: Main. This shows the main list UI
Module 2: Available Items Page. Shows a list of items. Each item on this page's list allows the user to specify a date by clicking a button/switch.
Module 3: Date Page. Shows the date page. The date page simply contains AnotherDatePicker. When the user selects a date or clicks Cancel, I want to take the user back to the previous page. This is when I call NavControl.RemoveCurrentPage.
However, this doesn't seem to work. Upon selecting a date, the date page will close but logs the following:
nested pop animation can result in corrupted navigation bar
Unbalanced calls to begin/end appearance transitions for Page (vc): Future Notes.
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
The above does point out that something is not quite right but it doesn't say where the issue is. As this message predicts, the nav bar does indeed get corrupted in that nothing happens when clicking on the Back button when module 2 is shown.
Can someone please point me in the right direction to resolve this?
Relevant code is below:
--DatePage--
Thanks.
I have run into an issue with using the subject method call.
I have the following setup in my project:
Module 1: Main. This shows the main list UI
Module 2: Available Items Page. Shows a list of items. Each item on this page's list allows the user to specify a date by clicking a button/switch.
Module 3: Date Page. Shows the date page. The date page simply contains AnotherDatePicker. When the user selects a date or clicks Cancel, I want to take the user back to the previous page. This is when I call NavControl.RemoveCurrentPage.
However, this doesn't seem to work. Upon selecting a date, the date page will close but logs the following:
nested pop animation can result in corrupted navigation bar
Unbalanced calls to begin/end appearance transitions for Page (vc): Future Notes.
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
The above does point out that something is not quite right but it doesn't say where the issue is. As this message predicts, the nav bar does indeed get corrupted in that nothing happens when clicking on the Back button when module 2 is shown.
Can someone please point me in the right direction to resolve this?
Relevant code is below:
--DatePage--
B4X:
Sub page_Appear
adp.Show
End Sub
Sub adp_Closed (Cancelled As Boolean, date As Long)
AvailableGmailDraftsPage.ShownAfterDatePicked = True
If Cancelled Then
' Main.NavControl.RemoveCurrentPage 'go back to the available drafts page
CallSubDelayed(Me,"ClosePage")
Else
AvailableItemsPage.DateSelected = True
SelectedDate = DateTime.Date(date)
SelectedTime = DateTime.Time(DateTime.Now+1*60*1000)
' Main.NavControl.RemoveCurrentPage ' go back to the available drafts page for now. should go to time page instead
CallSubDelayed(Me,"ClosePage")
End If
End Sub
Sub ClosePage
Main.NavControl.RemoveCurrentPage 'should go back seamlessly to the AvailableItemsPage
End Sub
Thanks.