-
Notifications
You must be signed in to change notification settings - Fork 0
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
14 changed files
with
347 additions
and
79 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
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,16 @@ | ||
PODS: | ||
- PopUpButton (1.0) | ||
|
||
DEPENDENCIES: | ||
- PopUpButton (from `../`) | ||
|
||
EXTERNAL SOURCES: | ||
PopUpButton: | ||
:path: "../" | ||
|
||
SPEC CHECKSUMS: | ||
PopUpButton: 1769a8faf9471c97f2ab08e5505204dec96bf362 | ||
|
||
PODFILE CHECKSUM: 94c6f2f9fa5f0b0f0753affc63203fb233199fc8 | ||
|
||
COCOAPODS: 1.9.1 |
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
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
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
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,20 @@ | ||
// swift-tools-version:5.1 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "PopUpButton", | ||
platforms: [.iOS(.v11)], | ||
products: [ | ||
.library( | ||
name: "PopUpButton", | ||
targets: ["PopUpButton"] | ||
) | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "PopUpButton", | ||
dependencies: [] | ||
) | ||
] | ||
) |
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 |
---|---|---|
@@ -1,42 +1,16 @@ | ||
# | ||
# Be sure to run `pod lib lint PopUpButton.podspec' to ensure this is a | ||
# valid spec before submitting. | ||
# | ||
# Any lines starting with a # are optional, but their use is encouraged | ||
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html | ||
# | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'PopUpButton' | ||
s.version = '0.1.0' | ||
s.summary = 'A short description of PopUpButton.' | ||
|
||
# This description is used to generate tags and improve search results. | ||
# * Think: What does it do? Why did you write it? What is the focus? | ||
# * Try to keep it short, snappy and to the point. | ||
# * Write the description between the DESC delimiters below. | ||
# * Finally, don't worry about the indent, CocoaPods strips it! | ||
|
||
s.version = '1.0' | ||
s.summary = 'A control for selecting an item from a list.' | ||
s.description = <<-DESC | ||
TODO: Add long description of the pod here. | ||
"A control for selecting an item from a list. In other words, single motion `NSPopUpButton` for iOS." | ||
DESC | ||
|
||
s.homepage = 'https://github.com/k-o-d-e-n/PopUpButton' | ||
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' | ||
s.screenshots = 'https://raw.githubusercontent.com/k-o-d-e-n/PopUpButton/master/Resources/demo.gif' | ||
s.license = { :type => 'MIT', :file => 'LICENSE' } | ||
s.author = { 'k-o-d-e-n' => '[email protected]' } | ||
s.source = { :git => 'https://github.com/k-o-d-e-n/PopUpButton.git', :tag => s.version.to_s } | ||
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' | ||
|
||
s.ios.deployment_target = '8.0' | ||
|
||
s.source_files = 'PopUpButton/Classes/**/*' | ||
|
||
# s.resource_bundles = { | ||
# 'PopUpButton' => ['PopUpButton/Assets/*.png'] | ||
# } | ||
|
||
# s.public_header_files = 'Pod/Classes/**/*.h' | ||
# s.frameworks = 'UIKit', 'MapKit' | ||
# s.dependency 'AFNetworking', '~> 2.3' | ||
s.social_media_url = 'https://twitter.com/K_o_D_e_N' | ||
s.ios.deployment_target = '11.0' | ||
s.source_files = 'Sources/PopUpButton/**/*' | ||
end |
Empty file.
Empty file.
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 |
---|---|---|
@@ -1,25 +1,58 @@ | ||
# PopUpButton | ||
|
||
[![CI Status](https://img.shields.io/travis/k-o-d-e-n/PopUpButton.svg?style=flat)](https://travis-ci.org/k-o-d-e-n/PopUpButton) | ||
[![Version](https://img.shields.io/cocoapods/v/PopUpButton.svg?style=flat)](https://cocoapods.org/pods/PopUpButton) | ||
[![License](https://img.shields.io/cocoapods/l/PopUpButton.svg?style=flat)](https://cocoapods.org/pods/PopUpButton) | ||
[![Platform](https://img.shields.io/cocoapods/p/PopUpButton.svg?style=flat)](https://cocoapods.org/pods/PopUpButton) | ||
A control for selecting an item from a list. In other words, single motion `NSPopUpButton` for iOS. | ||
|
||
```swift | ||
public final class PopUpButton : UIControl { | ||
|
||
public var itemsColor: UIColor? { get set } | ||
|
||
public var selectedItemColor: UIColor? { get set } | ||
|
||
public var coverBackgroundColor: UIColor? { get set } | ||
|
||
public var anchor: Anchor { get set } | ||
|
||
public var items: [Item] { get set } | ||
|
||
public var currentIndex: Int { get set } | ||
|
||
public struct Item { | ||
public let title: String | ||
} | ||
|
||
public enum Anchor { | ||
case window | ||
case superview | ||
} | ||
} | ||
|
||
``` | ||
|
||
## Example | ||
|
||
To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
<p align="center"> | ||
<img src="Resources/demo.gif"> | ||
</p> | ||
|
||
## Requirements | ||
|
||
Swift 5+ | ||
|
||
## Installation | ||
|
||
PopUpButton is available through [CocoaPods](https://cocoapods.org). To install | ||
it, simply add the following line to your Podfile: | ||
Cocoapods | ||
|
||
```ruby | ||
pod 'PopUpButton' | ||
``` | ||
|
||
Swift Package Manager | ||
|
||
``` | ||
.package(url: "https://github.com/k-o-d-e-n/PopUpButton.git", .branch("master")) | ||
``` | ||
|
||
## Author | ||
|
||
k-o-d-e-n, [email protected] | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Oops, something went wrong.