-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from donggyushin/feature/github-actions
[Feature] Github Actions
- Loading branch information
Showing
2 changed files
with
67 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,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 |
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,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() | ||
``` | ||
|
||
|
||
|