From 5025026c0f532abe6edcfd3653f7631da2e8f038 Mon Sep 17 00:00:00 2001 From: cockscomb Date: Sun, 28 Feb 2016 22:42:01 +0900 Subject: [PATCH] Prepare to publish --- .ruby-version | 1 + Gemfile | 3 +++ Gemfile.lock | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ HUDKit.podspec | 30 ++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++ README.md | 48 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 166 insertions(+) create mode 100644 .ruby-version create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 HUDKit.podspec create mode 100644 LICENSE create mode 100644 README.md diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..276cbf9 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.0 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..00a6b3f --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'cocoapods' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..03d0cdb --- /dev/null +++ b/Gemfile.lock @@ -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 diff --git a/HUDKit.podspec b/HUDKit.podspec new file mode 100644 index 0000000..6431c8c --- /dev/null +++ b/HUDKit.podspec @@ -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 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9cd60cd --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e16ef7c --- /dev/null +++ b/README.md @@ -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.