Skip to content

Commit

Permalink
Update sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuzv committed Jun 15, 2019
1 parent 6c0a22d commit c83ce34
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@

### 1.1

- Fix a crash.
- Fix a crash.

### 1.3

- Forward delegate calls.
28 changes: 26 additions & 2 deletions Example/Storyboard/StoryboardViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 () <UINavigationControllerDelegate, UIImagePickerControllerDelegate>
@end

Expand All @@ -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];
Expand All @@ -47,6 +64,13 @@ - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
NSLog(@"%@", @"Canceled");
}

@end
- (UIInterfaceOrientationMask)navigationControllerSupportedInterfaceOrientations:(UINavigationController *)navigationController {
return UIInterfaceOrientationMaskAll;
}

- (UIInterfaceOrientation)navigationControllerPreferredInterfaceOrientationForPresentation:(UINavigationController *)navigationController {
return UIInterfaceOrientationLandscapeLeft;
}

@end

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion RRNavigationBar.podspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4692E4191E7AED4A00C53A89"
BuildableName = "RRNavigationBar.app"
BlueprintName = "RRNavigationBar"
ReferencedContainer = "container:RRNavigationBar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4692E4191E7AED4A00C53A89"
BuildableName = "RRNavigationBar.app"
BlueprintName = "RRNavigationBar"
ReferencedContainer = "container:RRNavigationBar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4692E4191E7AED4A00C53A89"
BuildableName = "RRNavigationBar.app"
BlueprintName = "RRNavigationBar"
ReferencedContainer = "container:RRNavigationBar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4692E4191E7AED4A00C53A89"
BuildableName = "RRNavigationBar.app"
BlueprintName = "RRNavigationBar"
ReferencedContainer = "container:RRNavigationBar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

0 comments on commit c83ce34

Please sign in to comment.