githawkapp / contextmenu Goto Github PK
View Code? Open in Web Editor NEWAn iOS context menu UI inspired by Things 3.
Home Page: http://githawk.com/
License: MIT License
An iOS context menu UI inspired by Things 3.
Home Page: http://githawk.com/
License: MIT License
Imagine opening more menus from a base one. Dismissing should go "back" to the previous menu.
Make even easier to use. I imagine API could look something like:
// from within a view controller
self.showContextualMenu(MyContentViewController())
Require a dismiss
call.
Sent with GitHawk
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
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?
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'
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?
Would be nice if Carthage is also supported.
I'll be submitting a PR for this in a while.
App crash with custom cell (ImageView with Label)
If view is centered in the viewport, center the container frame.
Sent with GitHawk
Too light atm
Sent with GitHawk
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'
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!
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?
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.
Resign the keyboard
Sent with GitHawk
Idk if anyone has neat ideas. I'm happy to accept basically anything that keeps the "how to use" pretty simple.
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 ?
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:
UIApplication.shared.keyWindow?.tintAdjustmentMode = .dimmed
UIApplication.shared.keyWindow?.tintAdjustmentMode = .normal
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
https://developer.apple.com/documentation/objectivec/nsobject/1615089-accessibilityviewismodal
This will make sure VoiceOver does not try to access elements behind the context menu.
We will need to take care of allowing the context menu to be dismissed; at a minimum with the Z-gesture. Enabling to tap outside the view would also be appreciated.
Is there a possible solution to dismiss the menu when touching outside of the menu?
Not sure how people will use this control. Is this something you'd need?
I installed the POD ( pod 'ContextMenu') but it is missing ContextMenuDelegate, am I missing something ?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.