Lightweight dropdown message bar in Swift. It's simple and beautiful.

Overview

SwiftyDrop

SwiftyDrop is a lightweight pure Swift simple and beautiful dropdown message.

Version License Platform Carthage compatible Join the chat at https://gitter.im/morizotter/SwiftyDrop

Features

  • Easy to use like: Drop.down("Message")
  • Message field expands depending on the message.

How it looks

States

Default Success Warning Error

Blurs

Light Dark

iPhone X

iPhoneX

iPad

iPad

Demo

Git clone or download this repository and open SwiftyDrop.xcodeproj . You can try SwiftyDrop in your Mac or iPhone.

Runtime Requirements

  • iOS8.0 or later
  • Xcode 9.0
  • Swift 4.0

Installation and Setup

Note: Embedded frameworks require a minimum deployment target of iOS 8.1.

Information: To use SwiftyDrop with a project targeting iOS 8.0 or lower, you must include the SwiftyDrop/Drop.swift source file directly in your project.

Installing with CocoaPods

CocoaPods is a centralised dependency manager that automates the process of adding libraries to your Cocoa application. You can install it with the following command:

$ gem update
$ gem install cocoapods
$ pods --version

To integrate SwiftyDrop into your Xcode project using CocoaPods, specify it in your Podfile and run pod install.

platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDrop', '~>4.0'

Installing with Carthage

Just add to your Cartfile:

github "morizotter/SwiftyDrop" ~> 4.0

Manual Installation

To install SwiftyDrop without a dependency manager, please add all of the files in /SwiftyDrop to your Xcode Project.

Usage

Basic

To start using SwiftyDrop, write the following line wherever you want to show dropdown message:

import SwiftyDrop

Then invoke SwiftyDrop, by calling:

Drop.down("Message")

It is really simple!

States

SwiftyDrop has states of display.

Examples

Drop.down("Message")
Drop.down("Message", state: .Success)
Drop.down("Message", state: .Color(.orangeColor()))
Drop.down("Message", state: .Blur(.Light))

Custom states

You can customize looks by comforming DropStatable protocol. Examples are:

enum Custom: DropStatable {
    case BlackGreen
    var backgroundColor: UIColor? {
        switch self {
        case .BlackGreen: return .blackColor()
        }
    }
    var font: UIFont? {
        switch self {
        case .BlackGreen: return UIFont(name: "HelveticaNeue-Light", size: 24.0)
        }
    }
    var textColor: UIColor? {
        switch self {
            case .BlackGreen: return .greenColor()
        }
    }
    var blurEffect: UIBlurEffect? {
        switch self {
        case .BlackGreen: return nil
        }
    }
}

Drop.down(self.sampleText(), state: Custom.BlackGreen)

Of course you can use class or struct to make custom state if it is comforming to DropStatable protocol.

Prepared States are enum:

  • .Default
  • .Info
  • .Success
  • .Warning
  • .Error
  • .Color: UIColor
  • .Blur: UIBlurEffectStyle

Duration

Drop.down("Message", duration: 3.0)

You can change duration like this above. Default duration is 4.0.

Action

Drop.down("Message") {
    print("Action fired!")
}

Contribution

Please file issues or submit pull requests! We're waiting! :)

License

SwiftyDrop is released under the MIT license. Go read the LICENSE file for more information.

Comments
  • Animations not working as expected in iOS 10

    Animations not working as expected in iOS 10

    Previous to iOS 10, notifications would drop from the top of the screen as expected. There is no animation in iOS 10 and it seems to appear instantly.

    A preliminary search indicates this may be the problem: http://stackoverflow.com/questions/38965727/handling-autolayout-constraint-animation-differences-in-ios-10

    Ideally, whatever solution fixes this should still work in previous iOS versions.

    opened by jonkykong 7
  • Compilation warning

    Compilation warning

    With a Carthage install, I receive the following (and a bunch more of these):

    /Library/WebServer/focusbooster-ios/focus booster/Carthage/Checkouts/SwiftyDrop/SwiftyDrop/Drop.swift:76:74: warning: use of string literal for Objective-C selectors is deprecated; use '#selector' instead

    I'm using Xcode Version 7.3.1 (7D1014).

    opened by smebberson 4
  • fix to subscribe UIDeviceOrientationDidChange notification after label setup

    fix to subscribe UIDeviceOrientationDidChange notification after label setup

    Moved UIDeviceOrientationDidChange subscription from 'Drop.init()' to end of 'Drop.setup()'.

    Because the updateHeight() called from deviceOrientationDidChange(_:) handler can access uninitialized statusLabel when setup() has not been completed yet.

    https://github.com/morizotter/SwiftyDrop/issues/51

    opened by t-yoshii 3
  • Add the ability for a Drop to have an action.

    Add the ability for a Drop to have an action.

    This adds the ability for a Drop to execute a closure when tapped. In addition to the action completion block, it also has a userInfo dictionary which can allow a user to pass along data to work with when the closure executes, such as when using a Drop to respond to a Push Notification.

    opened by nickcharlton 3
  • won't compile with swift 2 in xcode 7 beta 2

    won't compile with swift 2 in xcode 7 beta 2

    perhaps best to create a temp swift-2 branch for fixes. These guys managed to do it like this -> pod 'CocoaLumberjack/Swift', :git => 'https://github.com/CocoaLumberjack/CocoaLumberjack.git', :branch => 'swift_2.0' pod 'CocoaLumberjack', :git => 'https://github.com/CocoaLumberjack/CocoaLumberjack.git', :branch => 'swift_2.0'

    screen shot 2015-07-02 at 3 28 17 pm

    opened by johndpope 3
  • applicationDidEnterBackground (unrecognized selector)

    applicationDidEnterBackground (unrecognized selector)

    Hy guys, all good?

    Thank you guys for the support and this lovely pod. I am using in the my projects, and now, for the first time, I get an error in fabric/crashlytics.

    Basically, there is a problem with the observer "applicationDidEnterBackground":

    Fatal Exception: NSInvalidArgumentException -[SwiftyDrop.Drop applicationDidEnterBackground:]: unrecognized selector sent to instance 0x10d121300

    I'm in the release 4.0.1 with Swift 4.

    Do you guys have any clues about that?

    Thank you so much!

    # Organization: Thiago Delmotteโ€™s Projects
    # Platform: ios
    # Version: 1.0 (22)
    # Issue #: 1
    # Date: 2017-11-07T20:20:00Z
    # OS Version: 11.1.0 (15B93)
    # Device: iPhone 6s
    # RAM Free: 15.4%
    # Disk Free: 56.9%
    
    #0. Crashed: com.twitter.crashlytics.ios.exception
    0  stuart                         0x100d66d6c CLSProcessRecordAllThreads (CLSProcess.c:376)
    1  stuart                         0x100d66d6c CLSProcessRecordAllThreads (CLSProcess.c:376)
    2  stuart                         0x100d66c1c CLSProcessRecordAllThreads (CLSProcess.c:407)
    3  stuart                         0x100d56ab4 CLSHandler (CLSHandler.m:26)
    4  stuart                         0x100d64d44 __CLSExceptionRecord_block_invoke (CLSException.mm:199)
    5  libdispatch.dylib              0x185fe5048 _dispatch_client_callout + 16
    6  libdispatch.dylib              0x185fedae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
    7  stuart                         0x100d647dc CLSExceptionRecord (CLSException.mm:206)
    8  stuart                         0x100d64614 CLSExceptionRecordNSException (CLSException.mm:102)
    9  stuart                         0x100d64228 CLSTerminateHandler() (CLSException.mm:259)
    10 libc++abi.dylib                0x1858a054c std::__terminate(void (*)()) + 16
    11 libc++abi.dylib                0x1858a05b8 std::terminate() + 60
    12 libobjc.A.dylib                0x1858b076c _destroyAltHandlerList + 10
    13 libdispatch.dylib              0x185fe505c _dispatch_client_callout + 36
    14 libdispatch.dylib              0x185fec6c8 _dispatch_block_invoke_direct$VARIANT$mp + 288
    15 FrontBoardServices             0x188d419f4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
    16 FrontBoardServices             0x188d41698 -[FBSSerialQueue _performNext] + 404
    17 FrontBoardServices             0x188d41c34 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
    18 CoreFoundation                 0x18660a2e8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    19 CoreFoundation                 0x18660a268 __CFRunLoopDoSource0 + 88
    20 CoreFoundation                 0x186609af0 __CFRunLoopDoSources0 + 204
    21 CoreFoundation                 0x1866076c8 __CFRunLoopRun + 1048
    22 CoreFoundation                 0x186527fb8 CFRunLoopRunSpecific + 436
    23 GraphicsServices               0x1883bff84 GSEventRunModal + 100
    24 UIKit                          0x18fafc2f4 UIApplicationMain + 208
    25 stuart                         0x100caca68 main (MainTabBarController.swift:10)
    26 libdyld.dylib                  0x18604a56c start + 4
    
    --
    
    Fatal Exception: NSInvalidArgumentException
    0  CoreFoundation                 0x186661d04 __exceptionPreprocess
    1  libobjc.A.dylib                0x1858b0528 objc_exception_throw
    2  CoreFoundation                 0x18666f1c8 __methodDescriptionForSelector
    3  UIKit                          0x18fe5711c -[UIResponder doesNotRecognizeSelector:]
    4  CoreFoundation                 0x1866676b0 ___forwarding___
    5  CoreFoundation                 0x18654d01c _CF_forwarding_prep_0
    6  CoreFoundation                 0x1865f40bc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
    7  CoreFoundation                 0x1865f365c _CFXRegistrationPost
    8  CoreFoundation                 0x1865f33c0 ___CFXNotificationPost_block_invoke
    9  CoreFoundation                 0x1866709c4 -[_CFXNotificationRegistrar find:object:observer:enumerator:]
    10 CoreFoundation                 0x18652a0c0 _CFXNotificationPost
    11 Foundation                     0x186f4b498 -[NSNotificationCenter postNotificationName:object:userInfo:]
    12 UIKit                          0x18fd04f6c __47-[UIApplication _applicationDidEnterBackground]_block_invoke
    13 UIKit                          0x18fe0e0bc +[UIViewController _performWithoutDeferringTransitions:]
    14 UIKit                          0x18fd04dc0 -[UIApplication _applicationDidEnterBackground]
    15 UIKit                          0x18ff97608 -[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]
    16 UIKit                          0x190712530 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
    17 UIKit                          0x19071235c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
    18 UIKit                          0x190484294 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
    19 UIKit                          0x19061b0ac _performActionsWithDelayForTransitionContext
    20 UIKit                          0x190484144 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
    21 UIKit                          0x19026a2d8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
    22 UIKit                          0x19010cd68 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
    23 FrontBoardServices             0x188d0e20c __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.362
    24 libdispatch.dylib              0x185fe5048 _dispatch_client_callout
    25 libdispatch.dylib              0x185fec6c8 _dispatch_block_invoke_direct$VARIANT$mp
    26 FrontBoardServices             0x188d419f4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
    27 FrontBoardServices             0x188d41698 -[FBSSerialQueue _performNext]
    28 FrontBoardServices             0x188d41c34 -[FBSSerialQueue _performNextFromRunLoopSource]
    29 CoreFoundation                 0x18660a2e8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
    30 CoreFoundation                 0x18660a268 __CFRunLoopDoSource0
    31 CoreFoundation                 0x186609af0 __CFRunLoopDoSources0
    32 CoreFoundation                 0x1866076c8 __CFRunLoopRun
    33 CoreFoundation                 0x186527fb8 CFRunLoopRunSpecific
    34 GraphicsServices               0x1883bff84 GSEventRunModal
    35 UIKit                          0x18fafc2f4 UIApplicationMain
    36 stuart                         0x100caca68 main (MainTabBarController.swift:10)
    37 libdyld.dylib                  0x18604a56c start
    
    #0. Crashed: com.twitter.crashlytics.ios.exception
    0  stuart                         0x100d66d6c CLSProcessRecordAllThreads (CLSProcess.c:376)
    1  stuart                         0x100d66d6c CLSProcessRecordAllThreads (CLSProcess.c:376)
    2  stuart                         0x100d66c1c CLSProcessRecordAllThreads (CLSProcess.c:407)
    3  stuart                         0x100d56ab4 CLSHandler (CLSHandler.m:26)
    4  stuart                         0x100d64d44 __CLSExceptionRecord_block_invoke (CLSException.mm:199)
    5  libdispatch.dylib              0x185fe5048 _dispatch_client_callout + 16
    6  libdispatch.dylib              0x185fedae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
    7  stuart                         0x100d647dc CLSExceptionRecord (CLSException.mm:206)
    8  stuart                         0x100d64614 CLSExceptionRecordNSException (CLSException.mm:102)
    9  stuart                         0x100d64228 CLSTerminateHandler() (CLSException.mm:259)
    10 libc++abi.dylib                0x1858a054c std::__terminate(void (*)()) + 16
    11 libc++abi.dylib                0x1858a05b8 std::terminate() + 60
    12 libobjc.A.dylib                0x1858b076c _destroyAltHandlerList + 10
    13 libdispatch.dylib              0x185fe505c _dispatch_client_callout + 36
    14 libdispatch.dylib              0x185fec6c8 _dispatch_block_invoke_direct$VARIANT$mp + 288
    15 FrontBoardServices             0x188d419f4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
    16 FrontBoardServices             0x188d41698 -[FBSSerialQueue _performNext] + 404
    17 FrontBoardServices             0x188d41c34 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
    18 CoreFoundation                 0x18660a2e8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    19 CoreFoundation                 0x18660a268 __CFRunLoopDoSource0 + 88
    20 CoreFoundation                 0x186609af0 __CFRunLoopDoSources0 + 204
    21 CoreFoundation                 0x1866076c8 __CFRunLoopRun + 1048
    22 CoreFoundation                 0x186527fb8 CFRunLoopRunSpecific + 436
    23 GraphicsServices               0x1883bff84 GSEventRunModal + 100
    24 UIKit                          0x18fafc2f4 UIApplicationMain + 208
    25 stuart                         0x100caca68 main (MainTabBarController.swift:10)
    26 libdyld.dylib                  0x18604a56c start + 4
    
    #1. com.apple.uikit.eventfetch-thread
    0  libsystem_kernel.dylib         0x186158bc4 mach_msg_trap + 8
    1  libsystem_kernel.dylib         0x186158a3c mach_msg + 72
    2  CoreFoundation                 0x186609c74 __CFRunLoopServiceMachPort + 196
    3  CoreFoundation                 0x186607840 __CFRunLoopRun + 1424
    4  CoreFoundation                 0x186527fb8 CFRunLoopRunSpecific + 436
    5  Foundation                     0x186f516e4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
    6  Foundation                     0x186f70afc -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
    7  UIKit                          0x19065b2f4 -[UIEventFetcher threadMain] + 136
    8  Foundation                     0x187052860 __NSThread__start__ + 996
    9  libsystem_pthread.dylib        0x18628c31c _pthread_body + 308
    10 libsystem_pthread.dylib        0x18628c1e8 _pthread_body + 310
    11 libsystem_pthread.dylib        0x18628ac28 thread_start + 4
    
    #2. com.twitter.crashlytics.ios.MachExceptionServer
    0  libsystem_kernel.dylib         0x186158bc4 mach_msg_trap + 8
    1  libsystem_kernel.dylib         0x186158a3c mach_msg + 72
    2  stuart                         0x100d51990 CLSMachExceptionServer (CLSMachException.c:180)
    3  libsystem_pthread.dylib        0x18628c31c _pthread_body + 308
    4  libsystem_pthread.dylib        0x18628c1e8 _pthread_body + 310
    5  libsystem_pthread.dylib        0x18628ac28 thread_start + 4
    
    #3. Thread
    0  libsystem_kernel.dylib         0x186179dbc __workq_kernreturn + 8
    1  libsystem_pthread.dylib        0x18628afa0 _pthread_wqthread + 884
    2  libsystem_pthread.dylib        0x18628ac20 start_wqthread + 4
    
    #4. com.apple.NSURLConnectionLoader
    0  libsystem_kernel.dylib         0x186158bc4 mach_msg_trap + 8
    1  libsystem_kernel.dylib         0x186158a3c mach_msg + 72
    2  CoreFoundation                 0x186609c74 __CFRunLoopServiceMachPort + 196
    3  CoreFoundation                 0x186607840 __CFRunLoopRun + 1424
    4  CoreFoundation                 0x186527fb8 CFRunLoopRunSpecific + 436
    5  CFNetwork                      0x186c92264 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404
    6  Foundation                     0x187052860 __NSThread__start__ + 996
    7  libsystem_pthread.dylib        0x18628c31c _pthread_body + 308
    8  libsystem_pthread.dylib        0x18628c1e8 _pthread_body + 310
    9  libsystem_pthread.dylib        0x18628ac28 thread_start + 4
    
    #5. Thread
    0  libsystem_pthread.dylib        0x18628ac1c start_wqthread + 122
    
    #6. Thread
    0  libsystem_kernel.dylib         0x186179dbc __workq_kernreturn + 8
    1  libsystem_pthread.dylib        0x18628afa0 _pthread_wqthread + 884
    2  libsystem_pthread.dylib        0x18628ac20 start_wqthread + 4
    
    #7. Thread
    0  libsystem_pthread.dylib        0x18628ac1c start_wqthread + 122
    
    #8. BKSAssertionClientMultiplexer
    0  libsystem_kernel.dylib         0x18617a800 kevent_id + 8
    1  libdispatch.dylib              0x1860008f8 _dispatch_kq_poll + 204
    2  libdispatch.dylib              0x185ffff0c _dispatch_event_loop_poke$VARIANT$mp + 412
    3  BaseBoard                      0x188b34c0c -[BSBaseXPCClient _sendMessage:withReplyHandler:waitForReply:waitDuration:] + 416
    4  AssertionServices              0x188b87b74 -[BKSAssertionClientMultiplexer sendEvent:withAssertionType:forEventType:responseHandler:] + 272
    5  AssertionServices              0x188b85134 -[BKSAssertion _clientQueue_invalidate:] + 172
    6  libdispatch.dylib              0x185fe5048 _dispatch_client_callout + 16
    7  libdispatch.dylib              0x185fedae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
    8  AssertionServices              0x188b84ecc -[BKSAssertion invalidate] + 84
    9  UIKit                          0x18fae4d0c -[_UIBackgroundTaskInfo invalidate] + 44
    10 UIKit                          0x18fd18ea0 -[UIApplication _endBackgroundTask:] + 84
    11 stuart                         0x100d7c3d4 -[ANSActivity endAndInvalidateBackgroundTask] (ANSActivity.m:150)
    12 stuart                         0x100d7c288 -[ANSActivity end] (ANSActivity.m:128)
    13 stuart                         0x100d78a50 -[ANSActivityOperation main] (ANSActivityOperation.m:36)
    14 Foundation                     0x186f5d620 -[__NSOperationInternal _start:] + 848
    15 Foundation                     0x18702f004 __NSOQSchedule_f + 404
    16 libdispatch.dylib              0x185fe5048 _dispatch_client_callout + 16
    17 libdispatch.dylib              0x185fed3d4 _dispatch_continuation_pop$VARIANT$mp + 428
    18 libdispatch.dylib              0x185febcd4 _dispatch_async_redirect_invoke$VARIANT$mp + 604
    19 libdispatch.dylib              0x185ff21c8 _dispatch_root_queue_drain + 596
    20 libdispatch.dylib              0x185ff1f10 _dispatch_worker_thread3 + 120
    21 libsystem_pthread.dylib        0x18628b120 _pthread_wqthread + 1268
    22 libsystem_pthread.dylib        0x18628ac20 start_wqthread + 4
    
    opened by thiagodelmotte 2
  • [Question] How to stop a Drop.down() message during the duration?

    [Question] How to stop a Drop.down() message during the duration?

    Other than tapping or swiping to dismiss the view, like answered in #39, how to stop a message programmatically?

    Would you use Drop.up() in some form?

    I am using a Drop.down() to display a message if there is no WiFi connection with a duration of 20 seconds. If WiFi is reachable within that duration, I would like the message to go away by itself.

    Any help or sample code will help, thanks.

    Great little framework, BTW. ๐Ÿ’ฏ

    opened by ghost 2
  • Crash at Drop.updateHeight()

    Crash at Drop.updateHeight()

    Hi,

    I am facing a crash at SwiftyDrop/SwiftyDrop/Drop.swift:130 with following stack trace. SwittyDrop version is 3.0.3.

    The direct cause is accessing nil Drop#statusLabel at SwiftyDrop/SwiftyDrop/Drop.swift:130. I think the cause is receiving UIDeviceOrientationDidChange notification before Drop.setup is executed, therefore, accessing statusLabel inside updateHeight() fails.

    Should the subscription of UIDeviceOrientationDidChange notification be started after setup?

    Thread 1Queue : com.apple.main-thread (serial) #0 0x00000001019311fc in specialized _fatalErrorMessage(StaticString, StaticString, StaticString, UInt, flags : UInt32) -> Never () #1 0x00000001017b5f14 in Drop.updateHeight() -> () at /snip/Pods/SwiftyDrop/SwiftyDrop/Drop.swift:130 #2 0x00000001017b5d00 in Drop.deviceOrientationDidChange(Notification) -> () at /snip/Pods/SwiftyDrop/SwiftyDrop/Drop.swift:99 #3 0x00000001017b60e0 in @objc Drop.deviceOrientationDidChange(Notification) -> () () #4 0x00000001821c0dfc in CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER () #5 0x00000001821c061c in _CFXRegistrationPost () #6 0x00000001821c039c in ___CFXNotificationPost_block_invoke () #7 0x0000000182229414 in -[_CFXNotificationRegistrar find:object:observer:enumerator:] () #8 0x00000001820fe6c8 in _CFXNotificationPost () #9 0x0000000182b0680c in -[NSNotificationCenter postNotificationName:object:userInfo:] () #10 0x0000000187409f3c in -[UIApplication _stopDeactivatingForReason:] () #11 0x000000018762a93c in -[UIApplication _runWithMainScene:transitionContext:completion:] () #12 0x0000000187627764 in -[UIApplication workspaceDidEndTransaction:] () #13 0x0000000183bbf7ac in FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK () #14 0x0000000183bbf618 in -[FBSSerialQueue _performNext] () #15 0x0000000183bbf9c8 in -[FBSSerialQueue _performNextFromRunLoopSource] () #16 0x00000001821d509c in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION () #17 0x00000001821d4b30 in __CFRunLoopDoSources0 () #18 0x00000001821d2830 in __CFRunLoopRun () #19 0x00000001820fcc50 in CFRunLoopRunSpecific () #20 0x00000001873ef94c in -[UIApplication _run] () #21 0x00000001873ea088 in UIApplicationMain () #22 0x00000001000abb5c in main at /snip/AppDelegate.swift:13 #23 0x0000000181c9a8b8 in start ()

    opened by t-yoshii 2
  • Swift 2.2 and Xcode 7.3.1

    Swift 2.2 and Xcode 7.3.1

    Hi, can we still use Swifty Drop with Swift 2.2 and Xcode 7.3.1? I installed pod 'SwiftyDrop', '~>2.0' previously, but the following method doesn't seem to work anymore.

    Drop.down(message) { print("Action fired!") }

    opened by zoufishanmehdi 2
  • Does the drop requires the top menu bar to be clean?

    Does the drop requires the top menu bar to be clean?

    In the app I am developing, I have bar items in the top of the app, that point with segues to other viewcontrollers or launch a Search bar. My question is: for the message drop to work, does the top bar has to be empty?

    THanks for your great work

    opened by gadget00 2
  • Multiline string jumps when panning

    Multiline string jumps when panning

    The label keeps resizing when I pan with a multiline string and it looks glitchy. This is on a iPhone 6s Plus, iOS 9.2. Do you want me to post more info?

    help wanted 
    opened by efremidze 2
  • Custom view issue

    Custom view issue

    import SwiftyDrop

    enum Custom: DropStatable {
    
        case BlackGreen
        var backgroundColor: UIColor? {
            switch self {
            case .BlackGreen: return .black
            }
        }
        var font: UIFont? {
            switch self {
            case .BlackGreen: return UIFont(name: "HelveticaNeue-Light", size: 24.0)
            }
        }
        var textColor: UIColor? {
            switch self {
            case .BlackGreen: return .green
            }
        }
        var blurEffect: UIBlurEffect? {
            switch self {
            case .BlackGreen: return nil
            }
        }
    }
    

    error:: Type 'Custom' does not conform to protocol 'DropStatable'

    please suggest me. how to solve this issue?

    opened by rameshpjpti 1
  • Show banner until you hide it instead of showing it for a certain duration

    Show banner until you hide it instead of showing it for a certain duration

    Hi, I want to be able to show the banner until I hide it instead for showing it for a certain duration i.e. 3 seconds. Is there a way of doing that? I looked into it but I don't see a method for that. Thank you!

    opened by zoufishanmehdi 0
  • Carthage code sign issue

    Carthage code sign issue

    In my project swifty drop casues code sign error when running on device. I use latest carthage (0.27) to build swiftydrop. The error is "this application's bundle identifier does not match its code signing identifier"

    opened by mstfy 0
  • Completion handler

    Completion handler

    Added a completion handler to the dropdown, as discussed in #55

    I kept action as the last parameter to drop(), so that we don't break anyone using trailing closure syntax. Based on a compile of my own project that uses SwiftyDrop, this doesn't seem to be a breaking change, but I'm not sure how adding this optional parameter will affect other projects.

    opened by andreyrd 2
Releases(4.2.0)
Owner
Morita Naoki
Traveller.
Morita Naoki
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
Simple DropDown Alert View For Any iOS Projects.

โš ๏ธ DEPRECATED, NO LONGER MAINTAINED JDropDownAlert JDropDownALert Simple DropDown Alert View For Any iOS Projects. Usage Top let alert = JDropDown

WonJo 71 Jul 17, 2022
zekunyan 608 Dec 30, 2022
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

Ivan Vorobei 1.8k Jan 7, 2023
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets. Support SwiftUI.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

Ivan Vorobei 1.4k Dec 10, 2021
A crisp in-app notification/message banner built in Swift.

RMessage Screenshots Intro Welcome to RMessage! RMessage is a simple notification library written in Swift to help you display notification on the scr

Adonis Peralta 407 Nov 29, 2022
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

BPStatusBarAlert BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

Ben.Park 131 Aug 12, 2022
Beautiful animated Alert View. Written in Swift

SCLAlertView Animated Alert View written in Swift, which can be used as a UIAlertView or UIAlertController replacement. Since UIAlertView is deprecate

Viktor Radchenko 5.2k Jan 3, 2023
Beautiful animated Login Alert View. Written in Objective-C

UIAlertView - Objective-C Animated Login Alert View written in Swift but ported to Objective-C, which can be used as a UIAlertView or UIAlertControlle

Letovsky 2 Dec 22, 2021
A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

Ali Samaiee 11 Jun 6, 2022
SplitSheet - A lightweight, fully interactive split-screen sheet.

SplitSheet A lightweight, fully interactive split-screen sheet. Powered by UIScrollView for super-smooth gestures. Show/hide either programmatically o

Andrew Zheng 154 Dec 15, 2022
Customizable simple Alert and simple ActionSheet for Swift

SimpleAlert It is simple and easily customizable alert. Can be used as UIAlertController. Appetize's Demo Requirements Swift 5.0 iOS 9.0 or later How

Kyohei Ito 397 Dec 6, 2022
๐ŸŒŠ - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.

Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexibl

Sebastian Boldt 2.4k Dec 25, 2022
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description ?? Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

HyperRedink 3.7k Dec 25, 2022
AlertView A pop-up framework, Can be simple and convenient to join your project.

RAlertView AlertView A pop-up framework, Can be simple and convenient to join your project. Warning content Installation Depend on the project Masonry

ๆœ่€€่พ‰ 71 Aug 12, 2022
A simple and attractive AlertView to ask permission to your users for Push Notification.

A simple and attractive AlertView **to ask permission to your users for Push Notification.** PRESENTATION Ask permission to user for push notification

Boisney Philippe 37 Mar 23, 2022
A simple alert with logo image and color.

YMLogoAlert About YMLogoAlert A simple custom alert. YMLogoAlert lets you pop up a simple alert with a natural animation, your app's own color, font a

Youngminah 8 Dec 21, 2022
A Simple And Minimalist iOS AlertController

HYAlertController HYAlertController is a minimalist alert control, that contains a variety of usage scenarios. It has the same syntax as Apple's UIAle

null 63 Jul 26, 2022