All Projects → inket → Mbpopup

inket / Mbpopup

Licence: mit
macOS status bar popups done right 😎

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Mbpopup

Swiftframeworktemplate
A template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file
Stars: ✭ 527 (+492.13%)
Mutual labels:  framework, cocoapods, carthage
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1225.84%)
Mutual labels:  framework, cocoapods, carthage
Orsserialport
Serial port library for Objective-C and Swift macOS apps
Stars: ✭ 609 (+584.27%)
Mutual labels:  framework, cocoapods, carthage
Gzipswift
Swift framework that enables gzip/gunzip Data using zlib
Stars: ✭ 356 (+300%)
Mutual labels:  framework, cocoapods, carthage
Cdalertview
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift
Stars: ✭ 1,056 (+1086.52%)
Mutual labels:  cocoapods, carthage, popup
Yndropdownmenu
✨ Awesome Dropdown menu for iOS with Swift 5.0
Stars: ✭ 1,259 (+1314.61%)
Mutual labels:  cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-22.47%)
Mutual labels:  cocoapods, carthage
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (+1222.47%)
Mutual labels:  cocoapods, carthage
Dikit
Dependency Injection Framework for Swift, inspired by KOIN.
Stars: ✭ 77 (-13.48%)
Mutual labels:  cocoapods, carthage
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (+1171.91%)
Mutual labels:  cocoapods, carthage
Ctshowcase
A simple to use Showcase library that can highlight arbitrary views in an iOS app
Stars: ✭ 73 (-17.98%)
Mutual labels:  cocoapods, carthage
Networking
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support
Stars: ✭ 1,269 (+1325.84%)
Mutual labels:  cocoapods, carthage
Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (+1197.75%)
Mutual labels:  cocoapods, carthage
Memorycache
LRU, type-safe, thread-safe memory cache class in Swift
Stars: ✭ 66 (-25.84%)
Mutual labels:  cocoapods, carthage
Unboxedalamofire
[Deprecated] Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.
Stars: ✭ 65 (-26.97%)
Mutual labels:  cocoapods, carthage
Notificationz
📡 Helping you own NotificationCenter in Swift!
Stars: ✭ 74 (-16.85%)
Mutual labels:  cocoapods, carthage
Silentscrolly
Scroll to hide navigationBar, tabBar and toolBar.
Stars: ✭ 79 (-11.24%)
Mutual labels:  cocoapods, carthage
Soundable
Soundable allows you to play sounds, single and in sequence, in a very easy way
Stars: ✭ 78 (-12.36%)
Mutual labels:  cocoapods, carthage
Hover
🎈 The smartest floating button
Stars: ✭ 81 (-8.99%)
Mutual labels:  cocoapods, carthage
Magnetic
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲
Stars: ✭ 1,252 (+1306.74%)
Mutual labels:  cocoapods, carthage

MBPopup

MBPopup is a macOS framework for easily adding a customizable status bar popup to your apps.

MBPopup is based on Popup by shpakovski, after it had been used in HAPU for 3+ years and incrementally improved on, and is now rewritten for Swift and improved for the Swift era.

More importantly, multiple parts have been rewritten in order to replicate the behavior of system menu bar items:

  • Opens with the right event
  • Closes on escape
  • Allows peeking (hold click to open then release to close)
  • Opens in the correct screen when clicked from a different (in)active screen
  • Changes focus as expected
  • etc.

While also,

  • Reacting to Auto Layout constraints as expected
  • Providing callbacks for user actions
  • Allowing for different states when modifier keys are used

MBPopup is App Store-approved and is currently being used in the app stts:

Usage

(For more examples, check the Example project, or stts' source)

Add MBPopup via Carthage:

Cartfile

github "inket/MBPopup"

or via CocoaPods:

Podfile

pod "MBPopup"

Use MBPopup in your app:

import MBPopup

let myView = NSView(frame: CGRect(x: 0, y: 0, width: 200, height: 300))
let popupController = MBPopupController(contentView: myView)

// Use popupController.statusItem to customize the NSStatusItem, set a title or an image
popupController.statusItem.title = "Test"
popupController.statusItem.length = 70

// Use popupController.backgroundView to customize the popup's background
popupController.backgroundView.backgroundColor = NSColor.windowBackgroundColor // Default value

// Customize animations, view sizes
popupController.openDuration = 0.15 // Default value
popupController.closeDuration = 0.2 // Default value
popupController.arrowSize = CGSize(width: 12, height: 8) // Default value
popupController.contentInset = 1 // Default value

// Use callbacks to user actions (optional)
popupController.shouldOpenPopup = { keys in return true }
popupController.willOpenPopup = { keys in debugPrint("Will open popup!") }
popupController.didOpenPopup = { debugPrint("Opened popup!") }
popupController.willClosePopup = { debugPrint("Will close popup!") }
popupController.didClosePopup = { debugPrint("Closed popup!") }

// Resize your popup to your liking
popupController.resizePopup(width: 300, height: 400)

Contact

@inket / @inket on Twitter / mahdi.jp

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].