【发布时间】:2012-12-03 09:53:28
【问题描述】:
好的,所以我在我的应用程序中使用了 UIScrollView。我已将滚动视图放在故事板的视图控制器中。我有几个按钮和一些标签。但是当我尝试向下滚动到底部的按钮时,滚动视图会弹回顶部。这是我使用的代码:
在 viewcontroller.h 中:
@interface ViewController : UIViewController{
IBOutlet UIScrollView *hovscroll;
}
@end
在 viewcontroller.m 中:
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[hovscroll setScrollEnabled:YES];
[hovscroll setContentSize:CGSizeMake(320, 1500) ];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
@end
【问题讨论】:
标签: objective-c uiscrollview scroll scrollview bounce