我想使用下面的代碼找到當前窗口。我無法在+(無效)加載和+(無效)初始化方法在目標c中找到當前的UIwindow?
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
//[[[UIApplication sharedApplication] keyWindow] addSubview:[[CompanyLogo alloc] init]];
[appDelegate.window addSubview:[[CompanyLogo alloc] init]];
當你這樣做會發生什麼? – matt