dismissing modalViewController all view move up by 20px

Discussion in 'iOS Programming' started by manoj, Apr 15, 2010.

  1. manoj macrumors newbie

    Joined:
    Nov 22, 2007
    #1
    here i am using presentModalViewController and dismissModalViewController with animation
    set to "YES" in both cases. Which works fine.

    However, after the modal view is dismissed, all of the content on the main view has moved
    up what looks like 20px.Its effect all the viewcontroller.

    Any idea why did it happen and how to resolve this.
    thanks
    :apple:
     
  2. HarryWorksInc macrumors regular

    Joined:
    Feb 21, 2010
  3. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #3

    I've seen this happen. Google for this problem and you'll see the solution. It happens when you directly add a subview to the main window, and then add a subview to the subview (if that made any sense), instead of using some sort of navigation controller.

    The solution basically comes down to a hack. In the viewDidLoad or viewDidAppear controllers for your subviews you have to manually shift the whole view by 20px every time they display.
     

Share This Page