Wednesday, May 23, 2012

Making two UIScrollViews follow each others scrolling

Set the delegate of scroll view A to be your view controller... then have...
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  CGPoint offset = scrollViewB.contentOffset;
  offset.y = scrollViewA.contentOffset.y;
  [scrollViewB setContentOffset:offset];
}

 

Monday, May 21, 2012

Application should run on background or not

  1. Open your info.plist file
  2. Add The Key UIApplicationExitsOnSuspend or Select Application does not run in background
  3. Set the new key to YES or Fill in the tick box