ボタン処理をしてみる

UIButtonを作成して配置、押した時の判定処理

UIButton *button;

/*!
 * @brief    ボタン作成 (画像を使用する場合)
 */
- (void) createButton
{
    button = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
    UIImage *normalImg = [UIImage imageNamed:@"image1.png"];    // 通常画像 
    UIImage *pressedImg = [UIImage imageNamed:@"image2.png"];   // 押下時画像 

    button.frame = CGRectMake( 100, 100, 100, 30 );
    button.backgroundColor = [UIColor clearColor];
    button.alpha = 1.0f;

    // 画像の登録 
    [button setBackgroundImage:normalImg forState:UIControlStateNormal];
    [button setBackgroundImage:pressedImg forState:UIControlStateHighlighted];

    // forControlEventsでイベント発生タイミングを指定 
    // UIControlEventTouchUpInside ・・・ 押下後、離した位置がボタンの範囲にある場合 
    [button addTarget:self 
               action:@selector(buttonAction)
     forControlEvents:UIControlEventTouchUpInside];

    [view addSubView:button];
}

/*!
 * @brief    ボタン押下時の処理
 */
- (void) buttonAction
{
    NSLog( @"buttonAction" );
}

ゲーム部分はOpenGL ESで描画し、その上にボタンを配置して処理を自分はしています。
自作で判定を作ってもいいですが、せっかくあるので。