在ios8中标题UITableView问题

时间:2014-10-16 10:53:24

标签: objective-c ipad storyboard ios8 uisplitviewcontroller

我在我的app.depends中使用splitviewcontroller进行主视图中的选择....... deatil视图将出现........我们有多个详细信息视图。  这是我调用详细视图的代码

- (void)setDetailItem:(id)newDetailItem
{
    [self.navigationController setDelegate:self];

    if (_detailItem != newDetailItem) {
        _detailItem = newDetailItem;

        // Update the view.
    }

    if([[self.detailItem description] isEqualToString:@"Companies"])
    {
        listViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:@"ListStoryBoard"];
        [self addChildViewController:listViewController_];

        if (![[PSAWebServices sharedInstance] isPushInProcess])      {

            [self.navigationController pushViewController:listViewController_ animated:YES];
        }


    }

    else if ([[self.detailItem description] isEqualToString:@"Contacts"])
    {
        contactlistViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:@"contactListView"];
        [self addChildViewController:contactlistViewController_];

        if (![[PSAWebServices sharedInstance] isPushInProcess])
        {
            [self.navigationController pushViewController:contactlistViewController_ animated:YES];
        }
    }

    else if ([[self.detailItem description] isEqualToString:@"Projects"])
    {
        projectViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:@"projectListView"];
        [self addChildViewController:projectViewController_];
        if (![[PSAWebServices sharedInstance] isPushInProcess])
        {
            [self.navigationController pushViewController:projectViewController_ animated:YES];
        }
    }
    else if ([[self.detailItem description] isEqualToString:@"Activities"])
    {
        activitiesViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:@"activityListView"];
        [self addChildViewController:activitiesViewController_];
        if (![[PSAWebServices sharedInstance] isPushInProcess])
        {
            [self.navigationController pushViewController:activitiesViewController_ animated:YES];
        }
    }

    else if ([[self.detailItem description] isEqualToString:@"Calendar"])
    {
        calendarViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:@"CalendarStoryBoard"];
        //[self.navigationController setNavigationBarHidden:YES];
        [self addChildViewController:calendarViewController_];
        //[self.view addSubview:self.calendarViewController.view];
        //[self.navigationController pushViewController:calendarViewController_ animated:YES];


        if (![[PSAWebServices sharedInstance] isPushInProcess])
        {

    [self.navigationController pushViewController:calendarViewController_ animated:YES];
        }

    }


}

这里是第一次来的问题 enter image description here 我的问题是我无法使用自动布局和约束在ios8中设置细节视图的框架 你能帮我解决这个问题吗? 提前致谢

但是当旋转设备时,它在屏幕上正确匹配 哪里出错了

0 个答案:

没有答案