LoginSignup
2
1

More than 5 years have passed since last update.

親navigationcontrollerを取得する

Posted at
hoge.m
NSArray *array = self.navigationController.viewControllers;
int arrayCount = [array count];
HogeViewController *parent = [array objectAtIndex:arrayCount - 2];

objectiAtIndexは -2 にすると呼び出し元になる

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1