非推奨のものを置き換えようとしています
[NSBundle loadNibNamed:@"Subscriptions" owner:self];
代わりにこれを使用します(同等のものを見つけることができるのはこれだけです)
[[NSBundle mainBundle] loadNibNamed:@"Subscriptions" owner:self topLevelObjects:nil];
ただし、非推奨の呼び出しで行っていたように開いたままにするのではなく、ダイアログがポップアップしてすぐに消えます。
このコードは、このようなビューコントローラー内にあります。
- (id)init{
self = [super init];
if (self) {
//[NSBundle loadNibNamed:@"Subscriptions" owner:self];
[[NSBundle mainBundle] loadNibNamed:@"Subscriptions" owner:self topLevelObjects:nil];
}
return self;
}
このようにappdelegateから呼び出しています。
SubscriptionsViewController *subscriptionsViewController = [[SubscriptionsViewController alloc] init];
[subscriptionsViewController.window makeKeyAndOrderFront:self];
足りないものはありますか?それは私には簡単に思えます。