私はObjective-Cとコーディングが初めてです。画面の上部から画面の下部に画像が引っ張られ、下部で音が鳴るアプリの作成を開始しました。
#import "TestiAppViewController.h"
@interface TestiAppViewController ()
@end
@implementation TestiAppViewController
-(IBAction)controlPan:(UIPanGestureRecognizer *)recognizer {
CGPoint translation = [recognizer translationInView:self.view];
recognizer.view.center = CGPointMake(recognizer.view.center.x, recognizer.view.center.y + translation.y);
[recognizer setTranslation:CGPointMake(0,0) inView:self.view];
}
- (void)viewDidLoad
{
[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
私が正しく理解していれば、y座標を使用してサウンドエフェクトを実行し、その方法でサウンドをトリガーできるはずです。しかし、私は今それをコーディングする方法を知りません。