Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 创建苹果ipad邮件视图_Iphone_Objective C_Ipad - Fatal编程技术网

Iphone 创建苹果ipad邮件视图

Iphone 创建苹果ipad邮件视图,iphone,objective-c,ipad,Iphone,Objective C,Ipad,我正在尝试创建一个如下所示的视图: 我知道这是一个UISplitView,但我的问题是如何创建位于UITableView左侧下方的UIToolBar,以及如何在细节视图(带有垃圾桶徽标、回复和新消息的视图)顶部创建图标。如何执行此操作?如果查看Interface Builder中UISplitView项目的DetailView.xib,可以将UIBarButtonims拖到其中包含的工具栏上 要在popover控制器中获得工具栏,只需使用UINavigationController附带的too

我正在尝试创建一个如下所示的视图:


我知道这是一个UISplitView,但我的问题是如何创建位于UITableView左侧下方的UIToolBar,以及如何在细节视图(带有垃圾桶徽标、回复和新消息的视图)顶部创建图标。如何执行此操作?

如果查看Interface Builder中UISplitView项目的DetailView.xib,可以将UIBarButtonims拖到其中包含的工具栏上

要在popover控制器中获得工具栏,只需使用UINavigationController附带的toobar即可。下面的代码应该让您了解如何做到这一点。将此代码添加到RootViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.clearsSelectionOnViewWillAppear = NO;
    self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);

    //setup toolbar
    self.navigationController.toolbarHidden = NO;
    UIBarButtonItem *refreshItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refresh:)];    
    [self setToolbarItems:[NSArray arrayWithObjects:refreshItem, nil]];
    [refreshItem release];    

    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(60.0, 10.0, 200.0, 21.0)];
    label.backgroundColor = [UIColor clearColor];
    label.textColor = [UIColor whiteColor];
    label.text = @"This is a label on the toolbar";
    [self.navigationController.toolbar addSubview:label];
    [label release];
}

如果你不介意我问,如果我想在DetailView上有一个工具栏呢?和上面的代码一样?你可以把工具栏拖到IB中的DetaiView上。实际上我的详细视图已经有了一个UITableView,所以我只需要在其中拖一个工具栏?如果您的表视图位于DetailView内部,那么您应该能够向上移动表视图的底部边缘,并在DetailView的底部添加工具栏。