Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display UITableViewController and handle tableView:didSelectRow #119

Closed
omidgolparvar opened this issue Oct 3, 2018 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@omidgolparvar
Copy link

Describe the bug
I present a UITableViewController :

let vc = /* instantiate my UITableViewController */

var attributes = EKAttributes.bottomFloat
attributes.entryBackground = .clear
attributes.entranceAnimation = .init(
	translate: .init(duration: 0.5, anchorPosition: .bottom, delay: 0, spring: .init(damping: 1.0, initialVelocity: 1)),
	scale: nil,
	fade: nil
)
attributes.displayDuration = .infinity
attributes.shadow = .none
attributes.scroll = .disabled
attributes.entryInteraction = .absorbTouches
attributes.screenInteraction = .dismiss
attributes.positionConstraints.verticalOffset = 0
attributes.positionConstraints.maxSize = .init(width: .constant(value: 500), height: .constant(value: 700))
attributes.positionConstraints.size = .init(width: .fill, height: .constant(value: (7 * 56) + 40))
attributes.screenBackground = .color(color: UIColor.black.withAlphaComponent(0.4))
attributes.windowLevel = .normal
attributes.exitAnimation = .init(
	translate: .init(duration: 0.2, anchorPosition: .bottom, delay: 0, spring: nil),
	scale: nil,
	fade: nil
)

SwiftEntryKit.display(entry: vc, using: attributes)

Expected behavior
I used this:

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
	print(#function)
	DispatchQueue.main.async { [weak self] in
		SwiftEntryKit.dismiss(with: { [weak self] in
			/* something */
		})
	}
}

But nothing happened; Even print did NOT call.

iPhone (please complete the following information):

  • Device: iPhone 8
  • iOS Version: 12.0
  • Xcode Version 10
  • Dependency Manager Version: CocoaPods 1.4.0
  • SwiftEntryKit Release: 0.5.6
@huri000
Copy link
Owner

huri000 commented Oct 4, 2018

Hi @omidgolparvar! Thank you for the detailed issue. I'll look into it during the next few days and keep you posted.

@huri000 huri000 self-assigned this Oct 4, 2018
@huri000 huri000 added the bug Something isn't working label Oct 4, 2018
@huri000
Copy link
Owner

huri000 commented Oct 4, 2018

@omidgolparvar
It's a bug in SwiftEntryKit's tap gesture handling.
The gesture recognizer swallows the touch instead of transferring it to the table view.
I'll update with a new version tomorrow.

huri000 added a commit that referenced this issue Oct 4, 2018
huri000 added a commit that referenced this issue Oct 4, 2018
huri000 added a commit that referenced this issue Oct 4, 2018
Bug Fix: Issue #119 - Entry tap gesture doesn't cancel touches inside…
@huri000
Copy link
Owner

huri000 commented Oct 4, 2018

Hi @omidgolparvar - I managed to fix it today. Please try 0.8.2. Let me know if that works for you.

@huri000 huri000 closed this as completed Oct 5, 2018
@huri000
Copy link
Owner

huri000 commented Oct 5, 2018

Seems it is resolved - closing the issue

@julianschiavo
Copy link

julianschiavo commented Oct 11, 2018

Hey, I seem to be experiencing this issue on the latest version of SwiftEntryKit. I have the same setup, where I'm using a TVC in a Float and didSelectRowAt isn't being called.

Seems to be fixed after tinkering around with the parameters. Sorry bout that.

@alouanemed
Copy link

@justjs Which params?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants