Skip to content

Commit

Permalink
Merge pull request #5 from donggyushin/feature/github-actions
Browse files Browse the repository at this point in the history
[Feature] Github Actions
  • Loading branch information
donggyushin committed Jan 18, 2022
2 parents d37ea41 + 86f2f83 commit eb472db
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Swift

on:
push:
branches: [ main, develop, feature/* ]
pull_request:
branches: [ main, develop, feature/* ]

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Build and tests ( iOS 15.0)
run: xcodebuild test -scheme DGAlertView -destination 'platform=iOS Simulator,OS=15.0,name=iPhone 12 Pro' CODE_SIGNING_ALLOWED=NO IPHONEOS_DEPLOYMENT_TARGET=12.0
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# DGAlertView
A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

<div>
<img src="https://user-images.githubusercontent.com/34573243/149630644-fd09960f-2794-4ca6-96b6-c896143aa9bb.gif" width=250 />
</div>

## Requirements
- iOS 12.0+
- Swift 5.5+
- Xcode 10.0+


## Installation

### SPM
```
File > Add Packages > https://github.com/donggyushin/DGAlertView
```

### CocoaPod
```
pod 'DGAlertView', :git => 'https://github.com/donggyushin/DGAlertView'
```

## Usage
```
func showAlert() {
let view: UIView = {
let view = UIView()
view.backgroundColor = .white
view.translatesAutoresizingMaskIntoConstraints = false
// Make sure give view height anyway
view.heightAnchor.constraint(equalToConstant: 200).isActive = true
return view
}()
let vc = DGAlertView(view)
// Make sure animated false
present(vc, animated: false)
}
// Hide DGAlertView programmatically
let vc = DGAlertView(view)
vc.hide()
```



0 comments on commit eb472db

Please sign in to comment.