是否有可能在IPad的UITabBar中添加按钮?

是否有可能在IPad的UITabBar中添加按钮?,ipad,uibutton,uitabbar,Ipad,Uibutton,Uitabbar,我想知道是否可以在iPad上的uitabar中添加UIButton。如果是这样,请让我知道。如果你看看@Kyle the Unruly建议的文档,这是相当直接的 以下是添加内置按钮和您自己的图像的示例: UIBarButtonItem * viewSnapShotButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:self action:@selector

我想知道是否可以在iPad上的
uitabar
中添加
UIButton
。如果是这样,请让我知道。

如果你看看@Kyle the Unruly建议的文档,这是相当直接的

以下是添加内置按钮和您自己的图像的示例:

UIBarButtonItem * viewSnapShotButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:self action:@selector(snapShotButtonPressed:)];
UIBarButtonItem * fontButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Font.png"] style:UIBarButtonItemStylePlain target:self action: @selector(fontSize:)];

// Add buttons to the tab bar
NSMutableArray *topCentreItems = [[NSMutableArray alloc] init];
UITabBar *topCentreTabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 0, 120, 75];
[topCentreItems addObject:viewSnapShotButton];
[topCentreItems addObject:fontButton];
topCentreTabBar.items = topCentreItems;

你有没有调查过uibarbuttonite