Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIscrollview resize problem
- CGRect scrollframe = scrollView.frame;
- NSLog(@"scrollframe.height=%f, pick height=%f",scrollframe.size.height, pick.frame.size.height);
- scrollframe.size.height -= pick.frame.size.height;
- [UIView beginAnimations:@"start" context:NULL];
- [UIView setAnimationDuration:0.2];
- [UIView setAnimationBeginsFromCurrentState:YES];
- [scrollView setFrame:scrollframe];
- NSLog(@"scroll height = %f",scrollframe.size.height);
- NSLog(@"scrollview height = %f", scrollView.frame.size.height);
- [pick setFrame:CGRectOffset([pick frame], 0, -220)];
- [UIView commitAnimations];
- [scrollframe setContentOffset:CGPointMake(scrollframe.contentOffset.x, scrollframe.contentOffset.y-100)];
- UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
- [contentView setBackgroundColor:[UIColor clearColor]];
- self.view = contentView;
- UIScrollView *horizontalScroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
- [horizontalScroll setBackgroundColor:[UIColor blackColor]];
- [horizontalScroll setDelegate:self];
- [contentView addSubview:horizontalScroll];
- UIPickerView *tempPicker = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 220, 320, 100)];
- [tempPicker setHidden:YES];
- [contentView addSubview:tempPicker];
Advertisement
Add Comment
Please, Sign In to add comment