-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'cocoapods' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activesupport (4.2.5.1) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
claide (0.9.1) | ||
cocoapods (0.39.0) | ||
activesupport (>= 4.0.2) | ||
claide (~> 0.9.1) | ||
cocoapods-core (= 0.39.0) | ||
cocoapods-downloader (~> 0.9.3) | ||
cocoapods-plugins (~> 0.4.2) | ||
cocoapods-search (~> 0.1.0) | ||
cocoapods-stats (~> 0.6.2) | ||
cocoapods-trunk (~> 0.6.4) | ||
cocoapods-try (~> 0.5.1) | ||
colored (~> 1.2) | ||
escape (~> 0.0.4) | ||
molinillo (~> 0.4.0) | ||
nap (~> 1.0) | ||
xcodeproj (~> 0.28.2) | ||
cocoapods-core (0.39.0) | ||
activesupport (>= 4.0.2) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
cocoapods-downloader (0.9.3) | ||
cocoapods-plugins (0.4.2) | ||
nap | ||
cocoapods-search (0.1.0) | ||
cocoapods-stats (0.6.2) | ||
cocoapods-trunk (0.6.4) | ||
nap (>= 0.8, < 2.0) | ||
netrc (= 0.7.8) | ||
cocoapods-try (0.5.1) | ||
colored (1.2) | ||
escape (0.0.4) | ||
fuzzy_match (2.0.4) | ||
i18n (0.7.0) | ||
json (1.8.3) | ||
minitest (5.8.4) | ||
molinillo (0.4.4) | ||
nap (1.1.0) | ||
netrc (0.7.8) | ||
thread_safe (0.3.5) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
xcodeproj (0.28.2) | ||
activesupport (>= 3) | ||
claide (~> 0.9.1) | ||
colored (~> 1.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
cocoapods | ||
|
||
BUNDLED WITH | ||
1.11.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Pod::Spec.new do |s| | ||
|
||
s.name = "HUDKit" | ||
s.version = "1.0.0" | ||
s.summary = "HUDKit provides HUD interface as UIPresentationController." | ||
|
||
s.description = <<-DESC | ||
HUDKit provides the HUD interface as an implementation of | ||
UIPresentationController. You can show your any view controllers in the HUD | ||
panel. | ||
HUDKit provides HUDProgressViewController also. This can be used as progress | ||
HUD easily. | ||
DESC | ||
|
||
s.homepage = "https://github.com/cockscomb/HUDKit" | ||
|
||
s.license = { :type => "MIT", :file => "LICENSE" } | ||
|
||
s.author = { "Hiroki Kato" => "mail@cockscomb.info" } | ||
s.social_media_url = "https://twitter.com/cockscomb" | ||
|
||
s.platform = :ios, "8.0" | ||
|
||
s.source = { :git => "https://github.com/cockscomb/HUDKit.git", :tag => "#{s.version}" } | ||
|
||
s.source_files = "HUDKit/Classes/**/*.{swift}" | ||
s.resource = "HUDKit/Classes/**/*.{xib}" | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Hiroki Kato | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# HUDKit | ||
|
||
HUDKit provides HUD interface as `UIPresentationController`. | ||
|
||
## Features | ||
|
||
HUDKit provides `HUDPresentationController`. This is the HUD interface as an implementation of `UIPresentationController`. You can show your any view controllers in the HUD panel. | ||
|
||
HUDKit provides `HUDProgressViewController` also. This can be used as progress HUD easily. | ||
|
||
## Usage | ||
|
||
Your view controller must implements `UIViewControllerTransitioningDelegate` like below. | ||
|
||
```swift | ||
import UIKit | ||
import HUDKit | ||
|
||
class ViewController: UIViewController, UIViewControllerTransitioningDelegate { | ||
|
||
... | ||
|
||
func presentationControllerForPresentedViewController(presented: UIViewController, presentingViewController presenting: UIViewController, sourceViewController source: UIViewController) -> UIPresentationController? { | ||
let HUD = HUDPresentationController(presentedViewController: presented, presentingViewController: presenting) | ||
HUD.dismissWhenTapped = true | ||
return HUD | ||
} | ||
|
||
} | ||
``` | ||
|
||
Next, you have to set it to the `transitioningDelegate` property and set `.Custom` to `modalPresentationStyle` property of your presented view controller. | ||
|
||
Now, call `presentViewController(_:animated:completion:)`. | ||
|
||
You can read the sample code at _Example_ directory for further informations. | ||
|
||
## Requirements | ||
|
||
- iOS 8 or later | ||
|
||
## Author | ||
|
||
Hiroki Kato, mail@cockscomb.info | ||
|
||
## License | ||
|
||
HUDKit is available under the MIT license. See the LICENSE file for more info. |