huynguyencong / ezpopup Goto Github PK
View Code? Open in Web Editor NEWEzPopup will help you to show popup in the simplest way
License: MIT License
EzPopup will help you to show popup in the simplest way
License: MIT License
In one of your latest updates, you made changes with an 'addChild' function call.
Line 173
When I go to run a build, I get "use of unresolved identifier 'addChild'" because the addChild function doesn't actually exist in the code.
can you plz a couple of transitions when the user open the pop up , tx
After showing a popup, tapping anywhere on the screen closes the popup, and no button actions get called
iOS 14 canTapOutsideToDismiss not working because of hierarchy change. Please check.
// MARK: - UIGestureRecognizerDelegate extension PopupViewController: UIGestureRecognizerDelegate { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { guard let touchView = touch.view, canTapOutsideToDismiss else { return false } if containerView.bounds.contains(touch.location(in: containerView)) { return false } return !touchView.isDescendant(of: containerView) } }
This code will fix that issue, you can update project if you need.
//CustomAlertViewController
static func instantiate() -> CustomAlertViewController? {
return UIStoryboard(name: "Main",bundle: nil).instantiateViewController(withIdentifier:
"\(CustomAlertViewController.self)") as? CustomAlertViewController
}
func setAlertValues(alertTitle:String, alertMessage: String, isEnableCancel:Bool){
self.lbl_AlertTitle?.text = alertTitle
self.lbl_AlertMessage?.text = alertMessage
self.btn_Cancel?.isHidden = isEnableCancel
}
// DashboardViewController
func shopPopUp(){
customAlertViewController?.setAlertValues(alertTitle: "Alert Title", alertMessage: "Message box", isEnableCancel: true)
let popupVC = PopupViewController(contentController: customAlertViewController!, position: .bottom(iPadToPhoneCustomSize(acutalSize: self.view.bounds.height/2 - 100)), popupWidth: self.view.bounds.width - iPadToPhoneCustomSize(acutalSize: 40), popupHeight: iPadToPhoneCustomSize(acutalSize: 200))
popupVC.cornerRadius = iPadToPhoneCustomSize(acutalSize: 20)
present(popupVC, animated: true, completion: nil)
}
Above is my code which i am calling on click action.
First time click its shows the default values associated with design.
When click again then its start working with assigned value customAlertViewController?.setAlertValues(alertTitle: "Alert Title", alertMessage: "Message box", isEnableCancel: true)
Where did went wrong do not understand please let me know!
If the inner view calls navigationController.pushViewController(controller, animated: true), it completely messes up the UI (popup stay above the new controller)
What is the proper way to keep navigation in the inner view ?
At the moment, we are dismissing the popup at the same time we use pushViewController but the problem is that when we use back the popup is not shown. Any idea ?
I initiated the popup as in the example. The screen dims and the popup appears to be there but cannot be seen, I can even do the canTapOutsideToDismiss and it dismisses this 'invisible' popup. Any ideas on how to fix this ?
Cannot do the following:
class MyPopupViewController: PopupViewController {...}
Making the class open will do it.
Hi @huynguyencong I am a graphic designer and i want to contribute by designing a logo for your project as a gift for free. I noticed that the project does not have a logo yet and i thought of helping out. If you will permit me i will start designing immediately and show you here. Thanks and best regards!
Hi,
First of all, I am very glad that this library exists, and thanks for all your efforts to implement this.
I found a critical issue.
The deinit
function is not called in the viewcontroller I've added as contentController
to PopupViewController class.
This means memory is not deallocated.
I've played a little with your provided example, and the same happens on your end.
Also, even if I am adding this in your parent class, deinit is not called in child class:
`deinit {
print("PopupViewController deinit")
self.contentController?.willMove(toParent: nil)
self.contentController?.view.removeFromSuperview()
self.contentController?.removeFromParent()
self.contentController = nil
self.contentView = nil
}`
Does anybody have any clue ?
Appreciate
When I try to install using Cocoa Pods, I am getting the error:
[!] Unable to find a specification for EzPopup
My Podfile looks like this:
`// Uncomment the next line to define a global platform for your project
platform :ios, '11.4'
target 'EcardCategoryPlay' do
// Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
// Pods for EcardCategoryPlay
pod 'SquareMosaicLayout', '4.1.1'
pod 'EzPopup'
target 'EcardCategoryPlayTests' do
inherit! :search_paths
# Pods for testing
end
end`
Hi, I am trying to use you library and have followed the example project as close as I can but for some reason, the view controller that I am trying to display as a popup is not showing, the screen darkens but nothing else happens, do you have any insights for this?
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.