All Projects → abdullahselek → ASToast

abdullahselek / ASToast

Licence: MIT license
A Swift extension for using Android style Toast notifications.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to ASToast

simple-notify
Pure javascript toast notifications.
Stars: ✭ 108 (+217.65%)
Mutual labels:  toast
vercel-toast
💬 Framework-agnostic vercel design's toast component (≈1KB Gzipped)
Stars: ✭ 67 (+97.06%)
Mutual labels:  toast
iOSProjects
It's project that contains different applications developed with Swift 5.7 👨‍💻👩🏼‍💻🧑🏿‍💻
Stars: ✭ 122 (+258.82%)
Mutual labels:  carthage
toaststrap
A simple, lightweight JavaScript library for showing Bootstrap 5 toast popups.
Stars: ✭ 16 (-52.94%)
Mutual labels:  toast
toaster-android
A simple library to add custom toast to android applications.
Stars: ✭ 22 (-35.29%)
Mutual labels:  toast
vue-toast
vue.js toast tips 提示文本 Vue1.0&2.0
Stars: ✭ 17 (-50%)
Mutual labels:  toast
Toast
🍞 The rounded and animated Android Toast for .NET WPF/XAML
Stars: ✭ 25 (-26.47%)
Mutual labels:  toast
Go-Flashcards
Go Flashcards for iOS and WatchOS - Official repository
Stars: ✭ 60 (+76.47%)
Mutual labels:  carthage
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+2902.94%)
Mutual labels:  toast
TastyToasty
An easy-to-use library to create tasty 😋 Toasts with a bunch of flavours 🌈. It also provides effortless methods to create Instagram like Toasts 💓
Stars: ✭ 54 (+58.82%)
Mutual labels:  toast
toppy
Overlay library for Angular 7+
Stars: ✭ 81 (+138.24%)
Mutual labels:  toast
AckBar
AckBar is a very lightweight and customizable android library to display brief message to user.
Stars: ✭ 14 (-58.82%)
Mutual labels:  toast
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (-11.76%)
Mutual labels:  toast
react-native-rooster
Your toast solution for react-native apps 🐔
Stars: ✭ 19 (-44.12%)
Mutual labels:  toast
BuckoNetworking
iOS Protocol-Oriented Networking in Swift
Stars: ✭ 18 (-47.06%)
Mutual labels:  carthage
react-native-toastboard
Toast feedback messages for React Native
Stars: ✭ 24 (-29.41%)
Mutual labels:  toast
fusion
An Easy-to-use Kotlin based Customizable Modules Collection with Material Layouts by BlackBeared.
Stars: ✭ 39 (+14.71%)
Mutual labels:  toast
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (+76.47%)
Mutual labels:  toast
mosha-vue-toastify
A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.
Stars: ✭ 185 (+444.12%)
Mutual labels:  toast
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (+35.29%)
Mutual labels:  toast

Build Status CocoaPods Compatible Carthage Compatible Coverage Status Platform License

ASToast

A Swift extension for using Android style Toast notifications. You may call ASToast methods directly from your view objects.

Screenshots

single_toast image_toast activity_toast

Requirements

ASToast Version Minimum iOS Target Swift Version
1.1.2 9.0 4.1
1.1.1 9.0 4.0
1.1.0 8.0 3.x
1.0.3 8.0 2.x

iOS 8.0+

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate ASToast into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'ASToast', '~> 1.1.2'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

brew update
brew install carthage

To integrate ASToast into your Xcode project using Carthage, specify it in your Cartfile:

github "abdullahselek/ASToast" ~> 1.1.2

Run carthage update to build the framework and drag the built ASToast.framework into your Xcode project.

Example Usage

make a toast with single text with default background color and custom message color

self.view.makeToast(message: "Single text toast",
					backgroundColor: nil,
					messageColor: UIColor.cyan)

make a toast with custom background color white message color

self.view.makeToast(message: "Single text toast",
					backgroundColor: UIColor.blue,
					messageColor: nil)

make a toast with text, title, position, duration and custom colors

self.view.makeToast(message: "Toast with custom text, title and duration",
					duration: TimeInterval(3.0),
					position: .center,
					title: "Title",
					backgroundColor: UIColor.blue,
					titleColor: UIColor.yellow,
					messageColor: UIColor.yellow,
					font: UIFont.systemFont(ofSize: 16))

make toast with an image and custom colors

self.view.makeToast(message: "Toast with an image",
					duration: TimeInterval(3.0),
					position: .top,
					image: UIImage(named: "apple_logo"),
					backgroundColor: UIColor.blue,
					titleColor: UIColor.yellow,
					messageColor: UIColor.yellow,
					font: UIFont.systemFont(ofSize: 16))

Show a custom view as toast

let customView: UIView! = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 200.0, height: 300.0))
customView.autoresizingMask = [UIViewAutoresizing.flexibleLeftMargin,
							   UIViewAutoresizing.flexibleRightMargin,
							   UIViewAutoresizing.flexibleTopMargin,
							   UIViewAutoresizing.flexibleBottomMargin]
customView.backgroundColor = UIColor.green

self.view.showToast(toastView: customView,
					duration: TimeInterval(3.0),
					position: .bottom)

Show an imageView as toast, on center at point (110,110)

let toastImageView: UIImageView! = UIImageView(image: UIImage(named: "apple_logo"))
self.view.showToast(toastView: toastImageView,
					duration: TimeInterval(3.0),
					point: CGPoint(x: 110, y: 110))

Show activity indicator

self.view.makeToastActivity()

Hide activity indicator

self.view.hideToastActivity()

MIT License

Copyright (c) 2015 Abdullah Selek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Credits

Inspired from Charles Scalesse (scalessec). Improved and all coded in new programming 
language Swift.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].