今回はViewクラスに実装しますが、もちろん実装方法はこの限りではありません。 メモで使うサンプルプロジェクト プロジェクト名:TestApp アプリケーションクラス:TestAppAppDelegate ビューコントローラクラス:TestAppViewController ビュークラス:TestAppView ビュークラスヘッダファイル"TestAppView.h" ビュークラスのinterfaceの定義にプロトコル"UIAccelerometerDelegate"を追加 UIAccelerometerのインスタンスを追加 @interface TestAppView : UIView { UIAccelerometer *accelerometer; } ビュークラスファイル"TestAppView.m" ビュークラスへ加速度センサを初期化するメソッドを定義する。 accelerome