Note that there are some explanatory texts on larger screens.

plurals
  1. POUIScrollview not displaying correctly second time around
    primarykey
    data
    text
    <p>I have a UIScrollview which loads fine, displays fine, does everything just fine. I then push another view controller, call it VC2, which also works fine. From VC2 I pop to go back to the UIScrollview and here is the weird behavior... when the UIScrollview comes back, the first (I am guessing) 300 pixels from the top are cut off. I can still see the content if I pull the page down but obviously that's not working for me. Anyone have any thoughts?</p> <p>Here is the code:</p> <p>This is creating the ScrollView:</p> <pre><code>-(IBAction)startNewSearch:(id)sender { NewSearch *VCscrollView = [[NewSearch alloc] init]; [[self navigationController] pushViewController:VCscrollView animated:YES]; } </code></pre> <p>The ScrollView</p> <pre><code>- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; scrollView.contentSize = CGSizeMake(320, 890); [scrollView setContentOffset:CGPointMake(0, 0) animated:NO]; [scrollView flashScrollIndicators]; } -(void)viewWillAppear:(BOOL)animated { scrollView.frame = CGRectMake(0, 0, 320, 890); } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } </code></pre> <p>IBAction which calls VC2 from within the ScrollView:</p> <pre><code>-(IBAction)previewSearch:(id)sender { VCcontactServer *VC2 = [[VCcontactServer alloc] init]; [[self navigationController] pushViewController:VC2 animated:YES]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload