导航项隐藏在设备4中并在模拟器中工作

时间:2016-01-25 13:24:23

标签: ios objective-c uinavigationbar

我设计了应用程序及其在设备,5s,ipad和所有模拟器中的工作。但不幸的是,当我在Device 4s中测试时,导航项目不会显示。

任何人都可以提供帮助。

从故事栏和下拉功能代码添加的左侧菜单如下: -

    UIImageView *menu =  [[UIImageView alloc] initWithFrame:CGRectMake(110, 12, 25, 15)];
    [menu setImage:[UIImage imageNamed:@"options.png"]];
    lblGroupName=[[UILabel alloc]initWithFrame:CGRectMake(-10, 5, 150, 25)];
    [lblGroupName setText:[NSString stringWithFormat:@"50"]];
    lblGroupName.text = [NSString stringWithFormat:@""];
    [lblGroupName setTextAlignment:NSTextAlignmentLeft];
    [lblGroupName setFont:[UIFont boldSystemFontOfSize:16]];
    [lblGroupName setTextColor:[UIColor whiteColor]];
    UIButton *actionBtn =  [UIButton buttonWithType:UIButtonTypeCustom];

    [actionBtn addTarget:self action:@selector(loadOptionTableView:) forControlEvents:UIControlEventTouchUpInside];
    [actionBtn setFrame:CGRectMake(0, 0, 135, 35)];
    actionBtn.backgroundColor=[UIColor clearColor];
    UIView *rightBarButtonItems = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width-20, 35)];
    [rightBarButtonItems addSubview:lblGroupName];
    [rightBarButtonItems addSubview:menu];
    [rightBarButtonItems addSubview:actionBtn];

    self.navigationItem.titleView =rightBarButtonItems;

Scree Desired

enter image description here

Device 4S IOS 7.1中显示的屏幕

enter image description here

0 个答案:

没有答案