1 ページにボタンのグリッドがあります。ボタンをクリックすると別のビューに移動したい。ビューを変更するには、次のアクションに何を追加すればよいですか?
-(void)buttonPressed:(UIButton *)button {
    NSLog(@"button %u -- frame: %@", button.tag, NSStringFromCGRect(button.frame));
}
ボタンのグリッドは次のように作成されます。
{
    int rows = 13, columns = 4;
    UIView *buttonView = [[UIView alloc] initWithFrame:CGRectMake(0.f, 0.f, 80*columns, 32*rows)];
    int currentTag = 0;
    for (int y = 0; y < rows; y++) {
        for (int x = 0; x < columns; x++) {
            UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom]; 
            //  [button.layer setBorderWidth:1.0]; 
            //  [button.layer setBorderColor:UIColor blackColor]];
            button.backgroundColor=[UIColor colorWithRed: 201.0/255.0 green: 201.0/255.0 blue:201.0/255.0 alpha: 1.0];
            button.tag = currentTag;
            currentTag++;
            [button.layer setBorderColor: [[UIColor blackColor] CGColor]];
            [button.layer setBorderWidth: 1.0];
            [button setTitle:[NSString stringWithFormat:@"%d",currentTag] forState:UIControlStateNormal];
            button.frame = CGRectMake(80*x, 32*y, 80, 32); 
            [button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
            [buttonView addSubview: button];
        }
    }
    // Center the view which contains your buttons
    CGPoint centerPoint = buttonView.center;
    centerPoint.x = self.view.center.x;
    buttonView.center = centerPoint;
    [self.view addSubview:buttonView];    
}