1、数据传输类:
#ifndef NotificationEntity_h
#define NotificationEntity_h
#import <Foundation/Foundation.h>
@interface NotificationEntity : NSObject
@property (nonatomic,retain) NSString *titleLabel;
@property (nonatomic,retain) NSString *dataLabel;
@end
#endif /* NotificationEntity_h */
#import "NotificationEntity.h"
@implementation NotificationEntity
@synthesize titleLabel = _titleLabel;
@synthesize dataLabel = _dataLabel;
@end
2、目标界面头文件加入:
@property (retain,nonatomic) NotificationEntity *mNotifEntity;
m文件加入:
@implementation PublishViewEditController
@synthesize mNotifEntity = _mNotifEntity;
3、调用:
NotificationEntity *mNotificationEntity = [[NotificationEntity alloc] init];
[mNotificationEntity setTitleLabel:msg];
PublishViewEditController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"PublishEdit"];
[vc setMNotifEntity:mNotificationEntity];
[self showViewController:vc sender:nil];