2011-07-19 11 views

答えて

0

ちょうどそれを試してください:.hファイルで

を:

UIToolbar* toolbar; 

の.mファイルで

UIBarButtonItem *actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(doAction)]; 
    toolbar   = [UIToolbar new]; 
    toolbar.barStyle = UIBarStyleDefault; 

    [toolbar sizeToFit]; 
    CGFloat toolbarHeight = [toolbar frame].size.height; 
    CGRect mainViewBounds = appDel.window.bounds; 
    [toolbar setFrame:CGRectMake(CGRectGetMinX(mainViewBounds), 
           438, 
           CGRectGetWidth(mainViewBounds), 
           toolbarHeight)];  

    [[[UIApplication sharedApplication] keyWindow] addSubview:toolbar]; 
関連する問題