finn-no / bottomsheet Goto Github PK
View Code? Open in Web Editor NEWCustom modal presentation style for thumb-friendly interactive views
License: MIT License
Custom modal presentation style for thumb-friendly interactive views
License: MIT License
When we import this module through cocoapods, we import
import FINNBottomSheet
when we do it through SPM we do
import BottomSheet
Then we need to fix this in order to support packages that offer cocoapods and spm integration.
What should be the exported module name?
ping @vadymmarkov
Could you add the ability to change handleView? color, visible, remove from super view?
[!] Unable to find a specification for FINNBottomSheet
You have either:
pod repo update
or with pod install --repo-update
.I have a UITableView in the BottomSheetView. Is there a way to make the scroll of the UITableView work?
hi~
BottomSheetView can appear successfully
But I want to collapse the bottomsheetView automatically
How can use?
Thanks.
Hi,
There is a situation like this that I can not find the reason.
Call the bottom sheet screen like this and screenshot first:
private lazy var bottomSheetTransitioningDelegate = BottomSheetTransitioningDelegate(
contentHeights: [.bottomSheetAutomatic, 200 ],
startTargetIndex: 0
)
let mViewcontroller = destination(.selectAccount) as! AccountListViewController
mViewcontroller.contentHeight = 200
mViewcontroller.transitioningDelegate = bottomSheetTransitioningDelegate
mViewcontroller.modalPresentationStyle = .custom
present(mViewcontroller, animated: true, completion: nil)
I call another viewController with the plus button.
let mViewcontroller = destination(.createAccount) as! NewAccountViewController
//mViewcontroller.modalPresentationStyle = .fullScreen
self.present(mViewcontroller, animated: true, completion: nil)
When returning from the newaccount screen with dismiss, the bottom sheet screen looks like this:
It's okay if I don't call it with fullscreen. But when calling as fullscreen, bottomsheet view width changes and viewDidDisappear method is called.
I could not find the reason, I hope you can help.
Thanks a lot.
getting error here
public required init?(coder: NSCoder) {
fatalError("Not implemented")
}
How to resolve this one ? @henrik242 @stigkj @oyvindio @sveisvei @ivarconr
Is it possible to have multiple view controllers at different vertical positions?
Hi there,
this is the same issue as here: #46
I just modified your demo code in order to reproduce it. You can clone it from here: https://github.com/oskarko/BottomSheetIssue
Just tap in the "view controller" button. and close the new ViewController.
An image:
I have been trying to fix it for a few hours but no luck so fat.
Repeat operation present and dismiss (View Controller button),but dismiss sometimes not work,touch other element can't any action,
with example project
in DemoViewController.swift / class ViewController / viewDidLoad() add code
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 50, height: 50) )
button.setTitle("tttt", for: .normal)
button.addTarget(self, action: #selector(self.tttt), for: .touchUpInside)
self.view.addSubview(button)
and function
@objc func tttt() {
self.dismiss(animated: true, completion: nil)
}
console only show
Will dismiss dismiss by nil
Did dismiss dismiss by nil
Will dismiss dismiss by nil
use ios 14.8.1,iphone SE
I missing something?
Any answer help me.
Thanks.
I basically, only copied the code from the readme
private func showSheet() {
guard let parentVC = self.parentViewController else {
return
}
let transitioningDelegate = BottomSheetTransitioningDelegate(
contentHeights: [290, 300],
startTargetIndex: 0,
presentationDelegate: self
)
let viewController = UIViewController()
viewController.transitioningDelegate = transitioningDelegate
viewController.modalPresentationStyle = .custom
parentVC.present(viewController, animated: true)
}
and used the delegate like
extension MyView: BottomSheetPresentationControllerDelegate {
func bottomSheetPresentationController(
_ controller: UIPresentationController,
shouldDismissBy action: BottomSheetView.DismissAction
) -> Bool {
return true
}
func bottomSheetPresentationController(
_ controller: UIPresentationController,
didCancelDismissBy action: BottomSheetView.DismissAction
) {
}
func bottomSheetPresentationController(
_ controller: UIPresentationController,
willDismissBy action: BottomSheetView.DismissAction?
) {
}
func bottomSheetPresentationController(
_ controller: UIPresentationController,
didDismissBy action: BottomSheetView.DismissAction?
) {}
}
I'm not sure why it jumps to the top of the parent view controller before dissmiss.
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.