[问题] Delegate 问题

楼主: mew3133 (SeanCheng)   2014-02-13 12:17:37
请问一下..
我有一个Viewcontroller &Delegate
APPDelegate.h 宣告
#import <UIKit/UIKit.h>
#import "View1Controller.h"
@interface TDAppDelegate : UIResponder <UIApplicationDelegate,
UISplitViewControllerDelegate>
@property(strong,nonatomic)View1Controller *TDController;
我该怎么指定TDController 为当下的View1Controller呢?
在View1Controller.m
-(void)viewDidLoad{
TDAppDelegate *TDAppdelegateView;
TDAppdelegateView.TDController=self;
}
我这样写好像指不过去QQ.....
作者: atst2 (atst2)   2014-02-13 12:22:00
[UIApplication sharedApplication].delegate =.view=self;打太快,delegate.view = 你的view如果是你自己定义的viewcontroller变量也是一样.
楼主: mew3133 (SeanCheng)   2014-02-13 15:39:00
谢谢~成功了多学到一招了

Links booklink

Contact Us: admin [ a t ] ucptt.com