An Android Wear style confirmation view for iOS

Overview

GoogleWearAlert

Objective-C version kindly written by dimohamdy - https://github.com/dimohamdy/GoogleWearAlert

An Android Wear style confirmation view for iOS - Written in Swift

This library is not intended as fully fledged alert view replacement (it has no buttons) this confirmation view is ideal for giving a success/fail/done/posted etc confirmation to the user.

The view has a number of customisations and you're welcome to tweak the constants to adjust the look/size/colors etc.

There are 4 different types already set up for you: Success, Error, Warning, Message (take a look at the screenshots)

Take a look at the Example project to see how to use this library.

Follow the developer on Twitter: (http://twitter.com/a2hgo) (Ash Robinson)

alt tag

alt tag alt tag alt tag alt tag

Installation

Drag the "GoogleWearAlertView" folder from the example project into your project. This library requires ARC.

To show notifications use the following code:

//Basic init
GoogleWearAlert.showAlert(title: "Success", type: .Success)

//Convenience init
GoogleWearAlert.showAlert(title:"Error", image:nil, type: .Error, duration: 2.0, inViewController: self)

//Full init      
GoogleWearAlert.showAlert(title: "Message", image: nil, type: .Message, duration: 2.0, inViewController: self, atPostion: .Bottom, canBeDismissedByUser: true)

//If using the basic init, it's recommended you set the default controller to present the alert in first
GoogleWearAlert.setDefaultViewController(self)

Consecutive calls will result in the alerts being queued and presented after the previous one has been dismissed.

Set canBeDismissedByUser to true to allow the user to tap to dismiss the alert.

The following properties can be set:

  • viewController: The view controller to show the notification in. This might be the navigation controller.
  • title: The title of the notification view
  • subtitle: The text that is displayed underneath the title (optional)
  • image: A custom icon image that is used instead of the default one (optional)
  • type: The notification type (Message, Warning, Error, Success)
  • duration: The duration the notification should be displayed

Supports iOS7 and iOS8

If you have ideas how to improve this library please let me know or send a pull request.

You might also like...
Blazing⚡️Fast BTC and ETH Wallet Generator library for React Native, Android and iOS

Blazing ⚡️ Fast BTC and ETH Wallet Generator library for React Native, Android and iOS.

Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects
Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects

Introduction Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the latest

React Native utility library around image and video files for getting metadata like MIME type, timestamp, duration, and dimensions. Works on iOS and Android using Java and Obj-C, instead of Node 🚀.

Qeepsake React Native File Utils Extracts information from image and video files including MIME type, duration (video), dimensions, and timestamp. The

Demo project to sync color changes to an Raspberry Pi Mood Light via iOS/Android
Demo project to sync color changes to an Raspberry Pi Mood Light via iOS/Android

Raspberry Pi Mood Light Demo project to remotely control an Raspberry Pi Mood Light over Bluetooth via iOS and Android. 📺 Watch the video Overview In

Allows you to emulate an Android native library, and an experimental  iOS emulation
Allows you to emulate an Android native library, and an experimental iOS emulation

unidbg Allows you to emulate an Android native library, and an experimental iOS emulation. This is an educational project to learn more about the ELF/

Runtime Mobile Security (RMS) 📱🔥  - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime
Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime

Runtime Mobile Security (RMS) 📱 🔥 by @mobilesecurity_ Runtime Mobile Security (RMS), powered by FRIDA, is a powerful web interface that helps you to

Fridax enables you to read variables and intercept/hook functions in Xamarin/Mono JIT and AOT compiled iOS/Android applications.

Fridax is a Node package for dealing with Xamarin applications while using the Frida API. Goal • Installation • Usage • Examples • Issues • License Bu

Kind of tired to need an Android Device on me, just to read manga, so here we are.

Dokusho Kind of tired to need an Android Device on me, just to read manga, so here we are. I am going to prioritize feature based on how I feel and no

Kotlin Multiplatform sample with SwiftUI and Compose (Desktop and Android) clients. Heavily inspired by Wordle game.
Kotlin Multiplatform sample with SwiftUI and Compose (Desktop and Android) clients. Heavily inspired by Wordle game.

WordMasterKMP Kotlin Multiplatform sample heavily inspired by Wordle game and also Word Master and wordle-solver samples. The main game logic/state is

Comments
  • Compiling error

    Compiling error

    I got the following error message in Xcode-beta 6:

    GoogleWearAlert.swift:126:33: 'AnyObject?' does not have a member named 'objectForKey'

    How to fix it?

    Thanks

    opened by bagusflyer 1
  • Shadow overlay blinking on iOS 7.1.2

    Shadow overlay blinking on iOS 7.1.2

    On an iPhone 5s with iOS 7.1.2 there's a bug connected with shadow overlay, that causes blinking while animation.

    When you comment out these lines everything is fine:

        self.layer.shadowColor = UIColor.blackColor().CGColor
        self.layer.shadowOffset = CGSizeMake(0, 0)
        self.layer.shadowOpacity = 0.8
    

    But you lose the nice shadow effect. Any other workaround?

    opened by ShadeApps 1
  • Swift 2 and xCode 7.1 issue

    Swift 2 and xCode 7.1 issue

    I get his error :

    GoogleWearAlertView.swift:41:9: Getter for 'viewController' with Objective-C selector 'viewController' conflicts with method 'viewController()' from superclass 'UIView' with the same Objective-C selector
    
    opened by chlebta 0
  • Unresolved identifier

    Unresolved identifier

    I had added the folder of GoogleWearAlertView to my project as you say in your tutorial, and calling an alert like the following:

    GoogleWearAlert.showAlert(title:"Error", image:nil, type: .Error, duration: 1.0, inViewController: self)

    But it tells me unresolved identifier for GoogleWearAlertView Xcode 6.3

    opened by strike277 1
Owner
Ash
Ash
Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.

scrcpy-mobile Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone. Currently only supports control

Ethan 140 Jan 2, 2023
A fancy collection style view controller that was inspired by this Profile Card mockup

JFCardSelectionViewController A fancy collection style view controller that was inspired by this Profile Card mockup: https://dribbble.com/shots/14584

Jeremy Fox 430 Dec 5, 2022
iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).

FinanceReactNative iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android). Data is pulled from Yahoo Finance

kf 2k Dec 29, 2022
Mi Card App for Android & IOS in Flutter

Mi Card Our Goal Now that you've seen how to create a Flutter app entirely from scratch, we're going to go further and learn more about how to design

Ruksar Ahmed 0 Nov 6, 2021
Magic 8Ball App for Android & IOS in Flutter

Magic 8 Ball ?? Our Goal The objective of this challenge is to solidify what you've learn't in the Dicee tutorial. This app will guide you through the

Ruksar Ahmed 0 Nov 6, 2021
🏀 iOS and Android NBA app created with React Native

Swish An iOS and Android NBA app created with React Native. If you would like to request a feature, find a bug, have a question, or would like to leav

James Kuczmarski 108 Nov 11, 2022
Joplin - an open source note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Forum: https://discourse.joplinapp.org/

Joplin® is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are sea

Laurent 33.7k Dec 30, 2022
The Bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, and Xamarin Forms.

Bitwarden Mobile Application The Bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, and Xamarin Forms. Build/Run Require

Bitwarden 4.2k Dec 29, 2022
The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS

Outline Client The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS. The Outline Client is design

Jigsaw 7.3k Dec 31, 2022
Keybase Go Library, Client, Service, OS X, iOS, Android, Electron

Keybase Hi, and welcome to the Keybase client repo. All our client apps (macOS, Windows, Linux, iOS, and Android) are being actively developed in this

Keybase 8.3k Dec 31, 2022