https://github.com/xopoko/spaceview
https://github.com/xopoko/spaceview
alert dropdown ios message notifications swift-3
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xopoko/spaceview
- Owner: Xopoko
- License: mit
- Created: 2016-12-26T13:12:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-29T21:32:32.000Z (almost 7 years ago)
- Last Synced: 2025-06-30T22:04:42.494Z (8 months ago)
- Topics: alert, dropdown, ios, message, notifications, swift-3
- Language: Swift
- Size: 200 KB
- Stars: 58
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpaceView
[](https://travis-ci.org/Xopoko/SpaceView)
[](http://cocoapods.org/pods/SpaceView)
[](http://cocoapods.org/pods/SpaceView)
[](http://cocoapods.org/pods/SpaceView)

## Example
- SpaceView On top
```swift
//View will be shown on the top
self.showSpace(title: "title", description: "description", spaceOptions: [.spacePosition(position: .top)
])
```

- SpaceView On bottom
```swift
//View will be shown at the bottom
self.showSpace(title: "title", description: "description", spaceOptions: [.spacePosition(position: .bot)
])
```

- SpaceView with default styles
```swift
self.showSpace(title: "title", description: "description", spaceOptions: [.spaceStyle(style: .success)
])
```
- SpaceView set time to hide
```swift
//SpaceView will not hide
self.showSpace(title: "title", description: "description", spaceOptions: [.spaceTimer(timer: 3.0)
])
```
- SpaceView set autohide
```swift
//View will hide after 3 second
self.showSpace(title: "title", description: "description", spaceOptions: [ .shouldAutoHide(should: false)
])
```
- SpaceView set image
```swift
//Image which will be shown on the right side of spaceView
self.showSpace(title: "title", description: "description", spaceOptions: [.image(img: UIImage()),
])
```
- SpaceView set swipe and tap handler
```swift
//Set the your custom handlers. By default tap handler will hide SpaceView.
//SwipeAction will perform after user did swipe SpaceView
self.showSpace(title: "title", description: "description", spaceOptions: [
.swipeAction {print("SPACE VIEW DID SWIPE")},
.tapAction {print("SPACE VIEW DID TAP")}
])
```
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- iOS 8.0
- Xcode 8.2
## Installation
SpaceView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "SpaceView"
```
## Author
Xopoko, alonsik1@gmail.com
## License
SpaceView is available under the MIT license. See the LICENSE file for more info.