Giter VIP home page Giter VIP logo

contextmenu's People

Contributors

av0c0der avatar basthomas avatar batjo avatar kidap avatar kukushi avatar marcuswu0814 avatar rnystrom avatar sbarow avatar wickwirew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contextmenu's Issues

Respond to keyboard

Thinking about making the “new issue” UI on GitHawk use this menu, but atm the menu doesn’t respond to the keyboard showing. Imagine if you have a text box in the menu, it could get really easy to cover it up.

I was thinking we could provide a “keyboard handling” enemy with options none, stickToBottom, stickToTop, and fit. Give the caller a bit of control.

Sent with GitHawk

Update to 0.5.1?

When I do pod 'ContextMenu' I get version 0.4.0. When I git clone I get version 0.5.1, which is the version in the podspec.

I guess you updated the code but didn't update the version that Cocoapods knows about. Can you do that? Is it waiting for something?

Update to Swift 4.2 and iOS 12

Carthage Build for iOS 12 project fails with exit code 65. This usually indicates that project itself failed to compile.

./ContextMenu/ContextMenuPresentationController.swift:56:30: error: value of type 'CGRect' has no member 'dominantCorner'

Pixel blending?

The text in this screenshot from GitHawk looks fuzzy. Inspecting the position of the container view, it appears to be snapped appropriately, but appears to be off. Should probably just snap to a whole pixel.

simulator screen shot - iphone xs - 2018-10-14 at 09 51 01

screen shot 2018-10-14 at 10 26 26 am

tint-dimming behind ContentMenu

This is a very nice implementation and I plan to use it in Working Copy for switching between branches and file modes.

Everything behind ContextMenu is dimmed slightly with the overlay, but I'm trying to also dim the tint using the UIViewTintAdjustmentModeDimmed mechanism. This makes it much clearer that the ContextMenu has focus.

Do you know of some way to inform UIKit that this should happen?

A regular modalPresentationStyle = .popover gives this effect, but I cannot figure out how to achieve this with modalPresentationStyle = .custom.

Being really picky about my development tools I'm still waiting for Swift tooling to mature and ported most of ContextMenu to objective-c. Is this something you would like to get back into the project or would you rather not?

dim

Add Carthage support

Would be nice if Carthage is also supported.
I'll be submitting a PR for this in a while.

Unable to find a specification for `ContextMenu`

I get this when trying to install the Pod

Unable to find a specification for 'ContextMenu'

doing this will work however
pod 'ContextMenu', git: 'https://github.com/GitHawkApp/ContextMenu.git'

How do I close the ContextMenu by code

Hi,

sorry if this is a dumb question but I couldn't find a way to close the ContextMenu by code without altering the Source. Is this possible?

Thanks!

Wrong present and dismiss position

I'm trying to use ContextMenu on rightBarButtonItem like this:

fileprivate func setupFilterButton() {
    let button = UIButton(type: .system)
    button.addTarget(self, action: #selector(filterButtonClicked), for: .touchUpInside)
    button.setTitle("Filter", for: .normal)
    let item = UIBarButtonItem(customView: button)
        
    navigationItem.rightBarButtonItem = item
}

@objc fileprivate func filterButtonClicked() {
    let viewController = UIViewController()
    viewController.preferredContentSize = CGSize(width: 200, height: 200)
        
    ContextMenu().show(sourceViewController: self,
                       viewController: viewController,
                       sourceView: navigationItem.rightBarButtonItem?.customView,
                       delegate: nil)
}

Present worked well, but dismiss animation look like had some problem.

And I also used it in IGListKit's method didSelectItem(at:)

override func didSelectItem(at index: Int) {
    guard let cell = collectionContext?.cellForItem(at: index, sectionController: self) else {
        fatalError()
    }
        
    let viewController = UIViewController()
    viewController.preferredContentSize = CGSize(width: 200, height: 200)
        
    ContextMenu().show(sourceViewController: self.viewController!,
                       viewController: viewController,
                       sourceView: cell,
                       delegate: nil)
}

Both present and dismiss position weird.

Any tips for me to fix this issue?

ezgif-4-7d370162d8

Ignore motion effect if reduce motion is turned on

If a user turns on reduce motion, we should ignore the motion effects.

If we want to keep the consumer of the library in charge, we should add a recommendation in the header docs and in the example code.

We can also choose to ignore motion on the library level - in which case we should update the header docs to reflect it.

Cooler example app

Idk if anyone has neat ideas. I'm happy to accept basically anything that keeps the "how to use" pretty simple.

How can i present two controllers on top of each other?

i am using (0.5.1) version. i am presenting firstViewController than i am presenting my secondViewController on firstViewController. while secondViewController is being presenting, both of the controllers are disappearing. How can i fix it ?

Use UIView.TintAdjustmentMode

Hey, @rnystrom

I think it would be nice to update tintAdjustmentMode like Apple UI controls do.
If you wish I can create a PR, just two lines of code:

  • on appear
UIApplication.shared.keyWindow?.tintAdjustmentMode = .dimmed
  • on disappear
UIApplication.shared.keyWindow?.tintAdjustmentMode = .normal

ezgif com-resize

Animation style

Hello,
Thanks a lot for this helpful library, just wondering if you provide a default drop down animation (from top) for the menu?
Many thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.