Push Hero - pure Swift native macOS application to test push notifications

Overview

Dropdowns

❤️ Support my app ❤️

❤️ ❤️ 😇 😍 🤘 ❤️ ❤️

Dropdown in Swift

Version License Platform Swift

Usage

Dropdowns provides the quickest way to present a dropdown in your app. It is very lightweight, just provide a list of items and the action closure you want to handle.

Basic

Dropdowns works by showing a child UIViewController as a dropdown from a TitleView. The most common use case is to show from a UINavigationController, in that sense, you can just create a list of items, and provide to TitleView.

let items = ["World", "Sports", "Culture", "Business", "Travel"]
let titleView = TitleView(navigationController: navigationController!, title: "Menu", items: items)
titleView?.action = { [weak self] index in
  print("select \(index)")
}

navigationItem.titleView = titleView

Customization

Dropdowns uses TableController by default, to show list of items in a UITableView. You can customise to show anything you want by using contentController.

let contentController = TableController(items: items, initialIndex: 0)
let dropdown = DropdownController(contentController: contentController, navigationController: navigationController)

Configuration

You can also customise many aspects of Dropdowns via Config

Config.List.DefaultCell.Text.color = UIColor.redColor()

Installation

Dropdowns is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Dropdowns'

Dropdowns is also available through Carthage. To install just write into your Cartfile:

github "onmyway133/Dropdowns"

Dropdowns can also be installed manually. Just download and drop Sources folders in your project.

Author

Credit

Contributing

We would love you to contribute to Dropdowns, check the CONTRIBUTING file for more info.

License

Dropdowns is available under the MIT license. See the LICENSE file for more info.

Comments
  • Add intial index parameter to 'TitleView'

    Add intial index parameter to 'TitleView'

    At the present, one can set an initial index with the use of a 'TableController'. Unfortunately, it is set privately in a 'DropdownController' and the 'dropdown' property set in the 'TitleView' cannot be changed because of it's reference in the 'action' block that would not be called properly if the 'dropdown' property is changed after initialization.

    This was the easiest way to allow the 'initial index' functionality at the present.

    opened by Tokuriku 2
  • Fix error

    Fix error "Unexpected duplicate tasks" when using Xcode new build system

    Ensures images are not included in "Compile Sources" build phase by adding .swift extension to the podspec source_files:

    s.ios.source_files = 'Sources/**/*.swift'
    

    Otherwise images appear both in the Sources and in the resources bundle, which causes the new build system to complain about "Unexpected duplicate task":

    Dropdowns-before

    After merging, please git tag 3.1.1 and then pod trunk push.

    Thanks!

    opened by yonat 0
  • Memory Leak on Background

    Memory Leak on Background

    Hi There,

    When I enter in background mode my app crashes due memory leak. I Comment the following code:

    let titleView = TitleView(navigationController: nav, title: company.company_name, items: companies)
                titleView?.button.label.textColor = .white
                titleView?.button.arrow.image = titleView?.button.arrow.image?.withRenderingMode(.alwaysTemplate)
                titleView?.button.arrow.tintColor = .white
                titleView?.action = { [weak self] index in
                  print("select \(index)")
                    let company_name = companies[index]
                    let company = user.companies.filter({ $0.company_name == company_name }).first
                    self?.selectedCompany = company
                    titleView?.button.label.textColor = .white
                    titleView?.button.arrow.image = titleView?.button.arrow.image?.withRenderingMode(.alwaysTemplate)
                    titleView?.button.arrow.tintColor = .white
                    AppSessionManager.shared.retrieveProducts = false
                    AppSessionManager.shared.retrieveOrders = false
                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "companyChange"), object: nil)
                }
                navigationItem.titleView = titleView
    

    Now my app does not have memory leaks. What could be happening?

    Best regards

    opened by alfredolucomav 0
  • background colour

    background colour

    hi, i am trying to change the color of the view that is behind the tableview that is now set to some sort of green (the view that u see when u scroll down). is there a way to do that?

    opened by arielsend 0
  • app dies on orientation changing

    app dies on orientation changing

    So. I integrated Dropdowns into my project and it worked fine until I started to work on landscape orientations. Every time I try to change orientation of simulator or even real device - app freezes forever and takes 100% cpu. Was hard for me to detect what part of app does actually crash it, but after all I found that without Dropdowns app doesn't show that bug

    opened by VladimirBrejcha 0
Releases(3.1.0)
Owner
Khoa
Check my apps https://onmyway133.com/apps
Khoa
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.

SlideMenuControllerSwift iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app. Installation CocoaPods pod 'SlideMenuControllerSwift' Carth

Yuji Hato 3.3k Dec 29, 2022
iOS Slide Menu Controller. It is written in pure swift.

SlideMenuController Requirements iOS 9+ Installation SlideMenuController is available through CocoaPods. To install it, simply add the following line

Myung gi son 40 Jan 16, 2022
a simple macOS menu bar application that shows you the lyrics of current playing spotify track.

lyricsify a simple macOS menu bar application that shows you the lyrics of current playing spotify track.

Krisna Pranav 4 Sep 16, 2021
Weather Dock is a MacOS headless application that shows popover view under the menu bar with weather info.

Weather Dock Weather forecast in MacOS menu bar Weather Dock is a MacOS headless application that shows popover view under the menu bar with weather i

Alexander Stepanischev 8 Dec 15, 2022
EasyMenu - SwiftUI Menu but not only button (similar to the native Menu)

EasyMenu SwiftUI Menu but not only button (similar to the native Menu) You can c

null 10 Oct 7, 2022
Alejandro Piguave 24 Dec 30, 2022
Panels is a framework to easily add sliding panels to your application

Panels is a framework to easily add sliding panels to your application. It takes care of the safe area in new devices and moving your panel when the k

Antonio Casero 1.5k Dec 14, 2022
Mac menu bar tool to view the architecture of the running application

Silicon Info About Silicon Info is a tiny menu bar application allows the user to quickly view the architecture of the currently running application.

William Castelli (Billy) 260 Dec 29, 2022
A menu bar app to change input source swiftly using shortcuts on macOS Big Sur or later.

Source Switcher A menu bar app to change input sources swiftly using shortcuts on macOS Big Sur and later. View screenshots Introduction This app uses

null 34 Nov 9, 2022
macOS (>11.0) Menu Bar App for WLED

wledQuickControl functions Left click on the Menubar icon will toggle the WLED device On/Off Right click on the Menubar icon: will update the icon/sli

satrik 15 Nov 8, 2022
SwiftBar - Powerful macOS menu bar customization tool

SwiftBar - Powerful macOS menu bar customization tool

SwiftBar 2k Jan 8, 2023
adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

Naman Dwivedi 930 Jan 2, 2023
Ambar is a macOS Menu Bar app built with SwiftUI.

Ambar Ambar is a macOS Menu Bar app built with SwiftUI. It is a template project which means that it can be used as a starting point for a new Menu Ba

null 16 Nov 14, 2022
Barber lives in your macOS menu bar and keeps track of what needs to be updated.

Barber Barber is a macOS application to keep track of application updates easily. It lives in your menu bar, and uses homebrew to determine what's out

Max Ainatchi 1 Nov 30, 2021
Control your display's brightness from the macOS menu bar. Simple and easy to use.

MonitorControl Lite Control your display's brightness from the macOS menu bar. Simple and easy to use. About MonitorControl Lite is a simplified versi

null 62 Dec 11, 2022
macOS menu bar app that displays the current status of SIP (System Integrity Protection)

MenuBarSIPDetector This is a DEMO app for my Swift library TINURecovery and it is a macOS menu bar app that displays the current status of SIP (System

null 19 Dec 18, 2022
Let's put notification Messages icon on menu bar of your macOS

DockBar DockBar is just a simple app that show messages icon on your status bar when you have unread messages. This app is very useful for people who

Bastard.y 5 Aug 16, 2022
Steven Troughton-Smith 57 Dec 6, 2022
Paimon's now in your macOS menu bar

PaimonMenuBar Paimon's now in your menu bar! Demo What's this? Genshin Impact has got a complicated daily system, consisting of: 4 Daily commisions. 5

Spencer Woo 138 Dec 30, 2022