react-native-navigation的迁移库

UIViewController+Utils.m 354B

12345678910111213141516
  1. #import "UIViewController+Utils.h"
  2. @implementation UIViewController (Utils)
  3. - (void)forEachChild:(void (^)(UIViewController *child))perform {
  4. for (UIViewController *child in [self childViewControllers]) {
  5. perform(child);
  6. }
  7. }
  8. - (BOOL)isLastInStack {
  9. return self.navigationController.childViewControllers.lastObject == self;
  10. }
  11. @end