看板 MacDev 關於我們 聯絡資訊
請問一下.. 我有一個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..... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.182.37
atst2:[UIApplication sharedApplication].delegate = 02/13 12:22
atst2: .view=self; 02/13 12:22
atst2:打太快,delegate.view = 你的view 02/13 12:24
atst2:如果是你自己定義的viewcontroller變數也是一樣. 02/13 12:25
mew3133:謝謝~成功了多學到一招了 02/13 15:39