UIScrollView があり、アプリを実行するとスクロール ビューが正常に動作します。スクロール ビューに 2 つのボタンを追加しようとすると、下部と上部にもう 1 つ、スクロール機能がなくなります。ボタンにアクションをまだ呼び出していません。スクロールビューの動作を見たかっただけです
なぜこれが起こるのか分かりません。
これが私のコードです。
.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