单例模式 属性 代理 通知 单例模式 某个类只产生一个对象,且是一个全局对象,以后每次创建该类对象时,只会得到第一次创建的那个类对象。 所以,可以用于在多视图场景下传递参数,原理如下图所示。 在创建单例类...
                            
                            
                                分类:
移动开发   时间:
2015-07-09 23:01:23   
                                阅读次数:
463
                             
                    
                        
                            
                            
                                RootViewController.m
#import "ModalViewController.h"
@interface RootViewController ()
@end
@implementation RootViewController {
    ModalViewController *modalCtrl;
    
}
- (id)initWithNibName:(...
                            
                            
                                分类:
其他好文   时间:
2014-10-29 14:58:08   
                                阅读次数:
169
                             
                    
                        
                            
                            
                                RootViewController.h
#import "ModalViewController.h"
@interface RootViewController : UIViewController
RootViewController.m
@interface RootViewController ()
@end
@implementation RootViewContro...
                            
                            
                                分类:
其他好文   时间:
2014-10-29 14:57:57   
                                阅读次数:
190