From c83ce34a1bbab93f1d46ef59a404b6a069971071 Mon Sep 17 00:00:00 2001 From: Shaw Date: Sat, 15 Jun 2019 16:02:50 +0800 Subject: [PATCH] Update sample. --- CHANGELOG.md | 6 +- Example/Storyboard/StoryboardViewController.m | 28 +++++- README.md | 2 +- RRNavigationBar.podspec | 2 +- .../xcschemes/RRNavigationBar.xcscheme | 91 +++++++++++++++++++ 5 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 RRNavigationBar.xcodeproj/xcshareddata/xcschemes/RRNavigationBar.xcscheme diff --git a/CHANGELOG.md b/CHANGELOG.md index fd3bb58..957886b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,4 +50,8 @@ ### 1.1 -- Fix a crash. \ No newline at end of file +- Fix a crash. + +### 1.3 + +- Forward delegate calls. \ No newline at end of file diff --git a/Example/Storyboard/StoryboardViewController.m b/Example/Storyboard/StoryboardViewController.m index d2004c0..1efc303 100644 --- a/Example/Storyboard/StoryboardViewController.m +++ b/Example/Storyboard/StoryboardViewController.m @@ -11,6 +11,23 @@ #pragma mark - +@interface _ImagePickerController : UIImagePickerController +@end + +@implementation _ImagePickerController + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskAll; +} + +- (BOOL)shouldAutorotate { + return true; +} + +@end + +#pragma mark - + @interface StoryboardViewController () @end @@ -31,7 +48,7 @@ - (void)present:(UIBarButtonItem *)sender { } - (void)pick:(UIBarButtonItem *)sender { - UIImagePickerController *controller = [UIImagePickerController new]; + UIImagePickerController *controller = [_ImagePickerController new]; controller.delegate = self; if (controller) { [self presentViewController:controller animated:YES completion:nil]; @@ -47,6 +64,13 @@ - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { NSLog(@"%@", @"Canceled"); } -@end +- (UIInterfaceOrientationMask)navigationControllerSupportedInterfaceOrientations:(UINavigationController *)navigationController { + return UIInterfaceOrientationMaskAll; +} + +- (UIInterfaceOrientation)navigationControllerPreferredInterfaceOrientationForPresentation:(UINavigationController *)navigationController { + return UIInterfaceOrientationLandscapeLeft; +} +@end diff --git a/README.md b/README.md index fd06f3c..3373a90 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/cuzv/RRNavigationBar/blob/master/LICENSE) -[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-v1.2-green.svg)](https://github.com/CocoaPods/CocoaPods) +[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-v1.3-green.svg)](https://github.com/CocoaPods/CocoaPods) [![Weibo](https://img.shields.io/badge/Weibo-cuzval-yellowgreen.svg)](https://weibo.com/cuzval/) [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/cuzval) diff --git a/RRNavigationBar.podspec b/RRNavigationBar.podspec index 0b717d0..9893109 100644 --- a/RRNavigationBar.podspec +++ b/RRNavigationBar.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RRNavigationBar" - s.version = "1.2" + s.version = "1.3" s.summary = "bring `UINavigationBar` to` UIViewController`" s.homepage = "https://github.com/cuzv/RRNavigationBar.git" diff --git a/RRNavigationBar.xcodeproj/xcshareddata/xcschemes/RRNavigationBar.xcscheme b/RRNavigationBar.xcodeproj/xcshareddata/xcschemes/RRNavigationBar.xcscheme new file mode 100644 index 0000000..bbd9600 --- /dev/null +++ b/RRNavigationBar.xcodeproj/xcshareddata/xcschemes/RRNavigationBar.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +