Skip to content

Commit

Permalink
Updates for version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CooperRS committed Jun 7, 2015
1 parent 9955a95 commit b60064d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This is an iOS control for presenting any UIView in UIActionSheet/UIAlertControl
### CocoaPods
```ruby
platform :ios, '8.0'
pod "RMActionController", "~> 1.0.0"
pod "RMActionController", "~> 1.0.1"
```

### Manual
Expand All @@ -28,7 +28,7 @@ pod "RMActionController", "~> 1.0.0"

The default RMActionController does not contain any content view. This means presenting an RMActionController only presents a set of buttons added to the RMActionController. For this task an UIAlertController can be used.

To add a content view RMActionController usually is subclassed. This project contains two subclasses of RMActionController (RMCustomViewActionController and RMMapActionController) which give two examples for a subclass of RMActionController. The following two section will show the process of subclassing RMActionController using the code of RMMapActionController.
To add a content view RMActionController usually is subclassed. This project contains two subclasses of RMActionController (RMCustomViewActionController and RMMapActionController) which give two examples for a subclass of RMActionController.

#### Subclassing

Expand Down Expand Up @@ -67,7 +67,7 @@ Presenting any RMActionController works by using standard Apple API.
}];

//Create action controller and (optionally) set title and message
RMCustomViewActionController *actionController = [RMCustomViewActionController actionControllerWithStyle:RMActionControllerStyleWhite selectAction:selectAction andCancelAction:cancelAction];
RMMapActionController *actionController = [RMMapActionController actionControllerWithStyle:RMActionControllerStyleWhite selectAction:selectAction andCancelAction:cancelAction];
actionController.title = @"Test";
actionController.message = @"This is a test action controller.\nPlease tap 'Select' or 'Cancel'.";

Expand All @@ -77,14 +77,16 @@ Presenting any RMActionController works by using standard Apple API.
```

### Advanced

#### Presentation Style
You can use the property `modalPresentationStyle` to control how the action controller is shown. By default, it is set to `UIModalPresentationOverCurrentContext`. But on the iPad you could use `UIModalPresentationPopover` to present the action controller within a popover. See the following example on how this works:

```objc
- (IBAction)openActionController:(id)sender {
//Create select and cancel action
...

RMCustomViewActionController *actionController = [RMCustomViewActionController actionControllerWithStyle:RMActionControllerStyleWhite selectAction:selectAction andCancelAction:cancelAction];
RMMapActionController *actionController = [RMMapActionController actionControllerWithStyle:RMActionControllerStyleWhite selectAction:selectAction andCancelAction:cancelAction];

//On the iPad we want to show the date selection view controller within a popover.
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
Expand All @@ -101,6 +103,7 @@ You can use the property `modalPresentationStyle` to control how the action cont
}
```

#### Others
Finially, RMActionController can be used in both your main application and an action extension showing UI.

## Documentation
Expand Down
6 changes: 3 additions & 3 deletions RMActionController.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "RMActionController"
s.version = "1.0.0"
s.platform = :ios, '8.0'
s.version = "1.0.1"
s.summary = "This is an iOS control for presenting any UIView in UIActionSheet/UIActionController like manner"
s.homepage = "https://github.com/CooperRS/RMActionController"
s.screenshots = "http://cooperrs.github.io/RMActionController/Images/Blur-Screen-Portrait.png", "http://cooperrs.github.io/RMActionController/Images/Blur-Screen-Landscape.png", "http://cooperrs.github.io/RMActionController/Images/Blur-Screen-Portrait-Black.png"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Roland Moers" => "[email protected]" }
s.source = { :git => "https://github.com/CooperRS/RMActionController.git", :tag => "1.0.0" }
s.source = { :git => "https://github.com/CooperRS/RMActionController.git", :tag => "1.0.1" }
s.source_files = 'RMActionController/*'
s.platform = :ios, '8.0'
s.requires_arc = true
s.framework = 'CoreGraphics', 'QuartzCore'
end

0 comments on commit b60064d

Please sign in to comment.