Browse Source

增加ZZNavigationControlle,并在UIKit暴露;

zzb 4 years ago
parent
commit
a8057cf529

+ 1 - 0
ZZUIKit.podspec

@@ -53,6 +53,7 @@ TODO: Add long description of the pod here.
     'ZZUIKit/Classes/ZZRaido/*',
     'ZZUIKit/Classes/ZZSelect/*',
     'ZZUIKit/Classes/ZZOption/*',
+    'ZZUIKit/Classes/ZZWebviewController/*',
     ]
   
   s.resource_bundles = {

+ 16 - 0
ZZUIKit/Classes/ZZNavigationController.h

@@ -0,0 +1,16 @@
+//
+//  ZZNavigationController.h
+//  ZZUIKit
+//
+//  Created by Max on 2021/5/18.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ZZNavigationController : UINavigationController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 32 - 0
ZZUIKit/Classes/ZZNavigationController.m

@@ -0,0 +1,32 @@
+//
+//  ZZNavigationController.m
+//  ZZUIKit
+//
+//  Created by Max on 2021/5/18.
+//
+
+#import "ZZNavigationController.h"
+
+@interface ZZNavigationController ()
+
+@end
+
+@implementation ZZNavigationController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
+    return [self.topViewController supportedInterfaceOrientations];
+}
+
+-(BOOL)shouldAutorotate{
+    return [self.topViewController shouldAutorotate];
+}
+
+-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
+    return [self.topViewController preferredInterfaceOrientationForPresentation];
+}
+@end

+ 1 - 0
ZZUIKit/Classes/ZZUIKit.h

@@ -30,5 +30,6 @@
 #import "ZZTextWidget.h"
 #import "ZZTextInputWidget.h"
 #import "ZZWebviewController.h"
+#import "ZZNavigationController.h"
 
 #endif /* ZZUIKit_h */