0
我有一个UIScrollView,当我运行我的应用程序时滚动视图工作正常。当我将两个按钮添加到滚动视图时,在底部和顶部的另一个按钮上,滚动功能将消失。我还没有对按钮调用任何操作。我只想在行动中看到滚动视图添加项目时UIScroll视图不会滚动
不知道为什么会发生这种情况。
这是我的代码。
.H
@interface ViewController : UIViewController {
IBOutlet UIScrollView *theScroller;
}
@end
.M
@implementation ViewController
- (void)viewDidLoad
{
[theScroller setScrollEnabled:YES];
[theScroller setContentSize:CGSizeMake(320, 900)];
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end