我有带有三个部分的分组样式的表格视图。从字典数组中获取信息。
我的应用程序适用于 UITable (Master) 和一个 UIView (root)。但是,我想继续将信息从选择的 Cell 推送到直接连接到 UIView(根)的第三个 UIView。
-UIView(根)有:
.h
@property (strong, nonatomic) id detailItem;
.m
#import "DetailViewController.h"
@interface DetailViewController ()
- (void)configureView;
@end
@implementation DetailViewController
@synthesize detailItem = _detailItem;
@synthesize courseDetailLabel = _courseDetailLabel;
#pragma mark - Managing the detail item
- (void)setDetailItem:(id)newDetailItem
{
if (_detailItem != newDetailItem) {
_detailItem = newDetailItem;
// Update the view.
[self configureView];
}
}
- (void)configureView
{
// Update the user interface for the detail item.
if (self.detailItem) {
self.courseDetailLabel.text = [[self.detailItem valueForKey:@"courseDetails"] description];
}
}