Hi
So, i have a view controller which contains just a scroll view. In viewDidLoad, i add a view to it from a nib, but when i do that, the scrolling stops working. The view i added works though, i.e. i can click buttons, but half of it is off screen.
@implementation JCEKScrollViewController_iPhone
@synthesize scrollView;
- (void)viewDidLoad {
scrollView.backgroundColor = [UIColor redColor];
scrollView.delegate = self;
NSArray *nibParts = [[NSBundle mainBundle] loadNibNamed:@"JCEKKeyboard"
owner:self
options:nil];
//first object is the view
UIView *keyboard = [nibParts objectAtIndex:0];
scrollView.contentSize = CGSizeMake(1000, 320);
[scrollView setAutoresizesSubviews:YES];
[scrollView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
[keyboard setAutoresizesSubviews:YES];
[keyboard setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
[scrollView addSubview:keyboard];
}
Thanks