画像を1フレーム上に移動するボタンを作り、ボタンをもう一度押すと、画像を1フレームの高さに戻します。画像を移動するボタンを作成する
http://imageshack.us/photo/my-images/140/72197925.png/ (溶液のイラスト)
私は可能な限り小さなコードを使用しようとしています。
変更する必要があるボタンのtouchUpInsideイベントにUIImage *image = [UIImage imageNamed:@"01bear.png"];
imageView = [[UIImageView alloc] initWithImage:image];
CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame];
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:applicationFrame];
scrollView.contentSize = CGSizeMake(5760, 1);
[scrollView addSubview:imageView];
[window addSubview:scrollView];
[window makeKeyAndVisible];
scrollView.delegate = self;
scrollView.pagingEnabled = YES;