我有一个 iPad 应用程序,它在纵向时可以正常工作。然而,在横向(即使被迫只使用横向)中,我添加的 UIBarButtonItems 看起来稍微靠右,以至于它们部分地从屏幕的右侧消失。这是我用来创建和添加按钮的代码片段:
-(void)viewDidLoad
{
AppDelegate *app = [[UIApplication sharedApplication] delegate];
UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.png"]];
[self.view addSubview:iv];
SDZFESServices *service = [SDZFESServices service];
[service setServiceUrl:[app serviceUrl]];
[service GetSeatingPlan:self action:@selector(SeatingPlanReturn:) group_id:[group ItemID] group_type:@"COU"];
self.title = [NSString stringWithFormat:@"Seating plan: %@", [group ItemName]];
UIBarButtonItem *bbi = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(SaveSeatingPlan:)];
[self.navigationItem setRightBarButtonItem:bbi];
}
有任何想法吗?只有按钮的左半部分可见。