UIBarButtonItem在横向定位中的定位

时间:2013-05-22 21:01:09

标签: ios objective-c uibarbuttonitem

我有一个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];

}

有什么想法吗?只有按钮的左半部分可见。

0 个答案:

没有答案