-
Notifications
You must be signed in to change notification settings - Fork 177
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
Dialog doesn't appear (XCode 7.3) #18
Comments
I have the same problem with XCode 7.3.1. |
Hey @mickaelmonsieur and @m-etka . I'm the new admin of this repo. Can you give me an example project of this problem? |
@riazurcse said: window = UIWindow(frame: UIScreen.mainScreen().bounds)
please Help...Thanks in advance... |
Hi @lfarah |
@mickaelmonsieur I got it to work using the UITextFieldDelegate: func textFieldDidBeginEditing(textField: UITextField) The problem is that once you show it once, it won't show for the next time. Related to #27 I believe |
Alright, now it works completely: func textFieldDidBeginEditing(textField: UITextField) {
let dialog = DatePickerDialog()
// textField.resignFirstResponder()
dialog.show("DatePickerDialog", doneButtonTitle: "Done", cancelButtonTitle: "Cancel", datePickerMode: .Time) {
(date) -> Void in
if date != nil {
let calendar = NSCalendar.currentCalendar()
let comp = calendar.components([.Hour, .Minute], fromDate: date!)
let hour = comp.hour
let minute = comp.minute
self.textField.text = "\(hour):\(minute)"
} else {
self.textField.text = ""
}
}
} We have a problem on the close() method that doesn't completely restarts the DatePicker |
Hey guys, I launched a new version (9830aa0) |
xcode 7.3.1 : "if date != nil {" ---> Value of type 'NSDate' can never be nil, comparison isn't allowed |
and the dialog will not open in my project, and in your demo either. (Only the button!) |
Hey @mickaelmonsieur, is there any other way we can contact (via Twitter DM or Facebook Messages) so we can solve this? |
I have the same problem. How to solve? When i set rootViewController programmatically in AppDelegate, DatePickerDialog not working anymore. |
It works fine for me. Would you like to share the code that you're trying to run? |
` window = UIWindow(frame: UIScreen.mainScreen().bounds)
When I click on the button, it will run the function. (selectDate()) `
. `
|
IOS10 have this problem.But IOS9 there is no problem. |
Hmm works for me on iOS10. |
When i set rootViewController programmatically in AppDelegate, DatePickerDialog not working anymore. |
Hi,guys, I'm not kidding. why do not you answer me? @benjohnde @lfarah |
I will look into this issue in more depth on Monday. |
Do you have any example project regarding your use case? You could create a repo, this would make things easier for us to deep dive into your issue. |
@nschucky can you give a help? |
Sorry, I'm a rookie. I won't create a repo. |
@shenyufei I think it is not really an effort for you to provide us with a sample project. You ask for help -- we want to help! We are not kidding either. I can not reproduce your bug on iOS 10, even when playing around with the UIWindow and rootViewController. If you won't create a repo, nobody can help you. Here you can see what I tried to reproduce your bug: https://github.com/benjohnde/DialogAppearance. Works fine for me. I guess you have two options: think about your code and debug it yourself or provide us with code, that does not work. Cheers! |
Hi, I know how to create a repo, and really have problems, please look at |
It's working for me! Using iOS 10.1 (Simulator and Device) and Xcode 8.1 (8B62). I converted your code to the most recent Swift 2.3 Syntax. |
Sorry, I tried last week is a bug, but no bug on the upload, so I find the problem, I will contact you |
Dialog doesn't appear on my project.
Dialog view's frame seems to be correct:
(0.0, 0.0, 320.0, 568.0)
Also I tried to bring subview front by adding this line in the
func show:
method:UIApplication.sharedApplication().windows.first!.bringSubviewToFront(self)
I'm using a navigation view controller under a tab bar controller. When debugging nothing seems to be wrong. I think it's only a visibility problem.
Any idea?
The text was updated successfully, but these errors were encountered: