Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - wxxsw/GSMessages: A simple style messages/notifications, in Swift.
A simple style messages/notifications, in Swift. Contribute to wxxsw/GSMessages development by creating an account on GitHub.
Visit SiteGitHub - wxxsw/GSMessages: A simple style messages/notifications, in Swift.
A simple style messages/notifications, in Swift. Contribute to wxxsw/GSMessages development by creating an account on GitHub.
Powered by 0x5a.live 💗
Demo
Example
To show notifications use the following code:
self.showMessage("Something success", type: .success)
To display a notice on a view:
view.showMessage("Something success", type: .success)
To hide a notification manually:
self.hideMessage()
Options (Current setting is default value):
- type : success / error / warning / info
- animation : slide(.normal) / slide(.distance(50)) / fade
- position : top / bottom
- textAlignment : topLeft / topCenter / topRight / left / center / right / bottomLeft / bottomCenter / bottomRight
self.showMessage("String or NSAttributedString", type: .success, options: [
.accessibilityIdentifier(nil),
.animations([.slide(.normal)]),
.animationDuration(0.3),
.autoHide(true),
.autoHideDelay(3.0),
.cornerRadius(0.0),
.height(44.0),
.hideOnTap(true),
.handleTap({}),
.isInsideSafeAreaInsets(true),
.margin(.zero),
.padding(.init(top: 10, left: 30, bottom: 10, right: 30)),
.position(.top),
.textAlignment(.center),
.textColor(.white),
.textNumberOfLines(1),
])
Font / Background Color
To set custom fonts and background colors in the following ways:
GSMessage.font = UIFont.boldSystemFont(ofSize: 14)
GSMessage.successBackgroundColor = UIColor(red: 142.0/255, green: 183.0/255, blue: 64.0/255, alpha: 0.95)
GSMessage.warningBackgroundColor = UIColor(red: 230.0/255, green: 189.0/255, blue: 1.0/255, alpha: 0.95)
GSMessage.errorBackgroundColor = UIColor(red: 219.0/255, green: 36.0/255, blue: 27.0/255, alpha: 0.70)
GSMessage.infoBackgroundColor = UIColor(red: 44.0/255, green: 187.0/255, blue: 255.0/255, alpha: 0.90)
Requirements
Master
- iOS 8.0+
- Xcode 11+ (Swift 5.x)
1.7.1
- iOS 8.0+
- Xcode 10.0+ (Swift 4.2)
1.5.1
- iOS 8.0+
- Xcode 9.0+ (Swift 4.0)
1.3.5
- iOS 8.0+
- Xcode 8.0+ (Swift 3.x)
1.2.4
- iOS 7.0+
- Xcode 7.3+ (Swift 2.x)
Installation
CocoaPods:
In your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod "GSMessages"
And in your *.swift
:
import GSMessages
Carthage:
In your Cartfile
:
github "wxxsw/GSMessages"
And in your *.swift
:
import GSMessages
License
GSMessages is available under the MIT license. See the LICENSE file for more info.
Swift Resources
are all listed below.
GitHub - davdroman/TextBuilder: Like a SwiftUI ViewBuilder, but for Text
resource
~/github.com
resource
GitHub - tadejr/ResizingTokenField: A token field implementation for iOS
resource
~/github.com
resource
GitHub - canalesb93/MantleModal: A draggable modal for iOS Applications.
resource
~/github.com
resource
GitHub - okmr-d/DOFavoriteButton: Cute Animated Button written in Swift.
resource
~/github.com
resource
GitHub - gmertk/GMStepper: A stepper with a sliding label in the middle.
resource
~/github.com
resource
GitHub - realm/SwiftLint: A tool to enforce Swift style and conventions.
resource
~/github.com
resource
GitHub - kciter/HorizontalDial: A horizontal scroll dial like Instagram.
resource
~/github.com
resource
GitHub - HeroTransitions/Hero: Elegant transition library for iOS & tvOS
resource
~/github.com
resource
GitHub - Brightify/Cuckoo: Boilerplate-free mocking framework for Swift!
resource
~/github.com
resource
GitHub - maxep/MXParallaxHeader: Simple parallax header for UIScrollView
resource
~/github.com
resource
GitHub - Viktoo/Insert3D: The fastest 🚀 way to embed a 3D model in Swift
resource
~/github.com
resource
GitHub - richardtop/CalendarKit: 📅 Calendar for Apple platforms in Swift
resource
~/github.com
resource
GitHub - exyte/PopupView: Toasts and popups library written with SwiftUI
resource
~/github.com
resource
GitHub - gkaimakas/SwiftValidators: String (and more) validation for iOS
resource
~/github.com
resource
GitHub - alexliubj/EZAnchor: An easier and faster way to code Autolayout
resource
~/github.com
resource
GitHub - Brightify/Reactant: Reactant is a reactive architecture for iOS
resource
~/github.com
resource
GitHub - Nero5023/CSVParser: A swift package for read and write CSV file
resource
~/github.com
resource
GitHub - andybest/linenoise-swift: A pure Swift replacement for readline
resource
~/github.com
resource
GitHub - s2mr/xc: Open your xcode project with Xcode of specific version
resource
~/github.com
resource
GitHub - marmelroy/Zip: Swift framework for zipping and unzipping files.
resource
~/github.com
resource
GitHub - yonaskolb/Beak: A command line interface for your Swift scripts
resource
~/github.com
resource
GitHub - Polidea/RxBluetoothKit: iOS & OSX Bluetooth library for RxSwift
resource
~/github.com
resource
Made with ❤️
to provide different kinds of informations and resources.