-
Notifications
You must be signed in to change notification settings - Fork 452
With Xcode-beta 3 it doesn't compile #31
Comments
I have found this as well the error I am getting is
on the following lines in ChatViewController.swift let frameNew = userInfo[UIKeyboardFrameEndUserInfoKey].CGRectValue()
let duration = userInfo[UIKeyboardAnimationDurationUserInfoKey].doubleValue
let frameNew = userInfo[UIKeyboardFrameEndUserInfoKey].CGRectValue() Can someone show how to fix this as I have done some googling and I cannot find a solution as swift in Xcode Beta 3 is relatively new |
You can investigate problem (I unfortunately don't have a time): Try conditionally unwrapping: let frameNew = userInfo[UIKeyboardFrameEndUserInfoKey]?.CGRectValue() And be careful since frameNew would be by this moment the optional value. And then probably you can unwrap the value (in the following code) since your are sure that there have to be value for that key in dictionary. I'm kind of not sure how it could pass in earlier version of Xcode since Dictionaries should return optionals |
I did
Let's try |
Thanks, all. @matsuosh your solution seems to work. I pushed a fix. Thanks! |
@mattdipasquale |
@matsuosh I'm glad to hear that. Thank you for the positive feedback and for checking out this project. I learned a lot myself while building it, and still, I'm sure there are many more improvements to be made. And, I'm sure we both still have more to learn and to teach each other. I look forward to learning more from you and to sharing what I learn with you and others. Best wishes to you, my friend! :-) |
There are some errors related to the optionals , probably due to api changes.
The text was updated successfully, but these errors were encountered: