iosiphoneuiscrollviewuinavigationcontrollertabbed-view

Elements in Scroll View shift/move upon returning to the SV?


I am working in a tabbed aplication type. And my problem is shown on the 3. step (see picture below): http://www.photoshack.com/albums/userpics/13055/Problem1.png

Here is my storyboard: http://www.photoshack.com/albums/userpics/13055/StoryBoard.png

Additional info:

Here are some additional informations about the environment and tech I work in : Xcode 5, iOS sdk 7, mac mini,mac OS X, Tabbed aplication type.

I really have no clue why this is happening and where to make modifications.

EDITED: 23.01.2014.

I am trying to use autolayout. And the problem persists even though I added all constraints (for every element) without errors/warnings. The elements only move in the UIScrollView. I tested it on a UIView without a UIScrollView and it worked normally. I still have no clue why this is happening... :-(


Solution

  • Looks to me Like the frame of your scroll view is getting modified… try setting your scroll view frame in viewWillAppear method such as:-

    -(void)viewWillAppear{

      self.scrollview.frame=CGRectMake(0,0,320,460);
    

    }