UnityViewControllerListener.h 1.5 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #import <Foundation/NSNotification.h>
  3. // view changes on the main view controller
  4. @protocol UnityViewControllerListener<NSObject>
  5. @optional
  6. - (void)viewWillLayoutSubviews:(NSNotification*)notification;
  7. - (void)viewDidLayoutSubviews:(NSNotification*)notification;
  8. - (void)viewWillDisappear:(NSNotification*)notification;
  9. - (void)viewDidDisappear:(NSNotification*)notification;
  10. - (void)viewWillAppear:(NSNotification*)notification;
  11. - (void)viewDidAppear:(NSNotification*)notification;
  12. - (void)interfaceWillChangeOrientation:(NSNotification*)notification;
  13. - (void)interfaceDidChangeOrientation:(NSNotification*)notification;
  14. @end
  15. void UnityRegisterViewControllerListener(id<UnityViewControllerListener> obj);
  16. void UnityUnregisterViewControllerListener(id<UnityViewControllerListener> obj);
  17. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillLayoutSubviews;
  18. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidLayoutSubviews;
  19. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillDisappear;
  20. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidDisappear;
  21. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillAppear;
  22. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidAppear;
  23. extern "C" __attribute__((visibility("default"))) NSString* const kUnityInterfaceWillChangeOrientation;
  24. extern "C" __attribute__((visibility("default"))) NSString* const kUnityInterfaceDidChangeOrientation;