iOS Question nested push animation can result in corrupted navigation bar

Discussion in 'iOS Questions' started by Shay, Feb 11, 2015.

  1. Shay

    Shay Well-Known Member Licensed User

    I am going back and forward on 2 pages
    and after 2-3 times I am getting these errors and my page is not displaying (only black screen)

    this is what I see in logger:
    Class (b4i_byhistoryc) instance released.
    nested push animation can result in corrupted navigation bar
    Class (b4i_httpjob) instance released.
    Unbalanced calls to begin/end appearance transitions for Page (vc): Get Client.
    Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

    What is the problem?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload your project (or better, a simple project that demonstrates this issue)?
     
  3. Shay

    Shay Well-Known Member Licensed User

    This is very problematic, since it losing it's location - meaning buttons are not responding (instance released.)
    it will be hard to cut this code and send you, but I think I know how to replicate:
    1. create class with few buttons with images
    2. call new class with http job
    3. on job done, call first class
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    See my post in the other thread related to instance released. You need to correctly keep references to your class instances.
     
  5. Shay

    Shay Well-Known Member Licensed User

    This issue is still open, Erel please replicate (see my first post on how to replicate)
    My class is configured as public class on "Main"
    So it should be still kept it's reference.

    if I put button and make it to move to some class page then it is ok,
    the issue is the automatic transfer to different class page after getting response from the http job
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Please upload a project that demonstrates this issue.
     
  7. Shay

    Shay Well-Known Member Licensed User

    Issue replicated,
    Attached
    press "move to page2" then "move to page3", see it is staying on page 3, and you see the errors in the logs.
    don't change server name, let it fail
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    I press on the Move to page 3 button. It moves to the next page, shows a short toast message and returns to the previous page. I can then do it again and again.

    These are the logs:
    Do you see something else?
     
  9. Shay

    Shay Well-Known Member Licensed User

    yes I see the nested errors
    Can you try IOS 7?
    Did you use debug mode?

     
    Last edited: Mar 6, 2015
  10. Erel

    Erel Administrator Staff Member Licensed User

    I now see it too. It only happens on iOS 7. It happens because you remove the current page before it finished the transition animation.

    The simplest way to solve it is with a timer that stars the download after 3 seconds:
    Code:
    Public Sub Initialize

       
    If Page1.IsInitialized = False Then
         Page1.Initialize(
    "Page1")
         Page1.RootPanel.LoadLayout(
    "Page3")
         Page1.Title = 
    "Page 2"
         Page1.RootPanel.Color = 
    Colors.RGB (54,54,54)
         Page1.HideBackButton = 
    True ' block button back
         Log("Opened Page3")
       
    End If
       Main.NavControl.ShowPage(Page1)
       waitForAnimation.Initialize(
    "waitForAnimation"3000)
       waitForAnimation.Enabled = 
    True
    End Sub
    Sub waitForAnimation_tick
       waitForAnimation.Enabled = 
    False
       ExecuteRemoteQuery(
    "a=1&b=2" ,"Post1")
    End Sub
     
  11. Shay

    Shay Well-Known Member Licensed User

    Thanks, I added 1 second delay
    issue resolved
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice