Comments (6)
I have found this as well the error I am getting is
'String' is not a subtype of 'DictioanryIndex<NSObject, AnyObject>'
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
from chats.
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
from chats.
I did
let frameNew = (userInfo[UIKeyboardFrameEndUserInfoKey] as NSValue).CGRectValue()
let duration = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as NSNumber).doubleValue
let frameNew = (userInfo[UIKeyboardFrameEndUserInfoKey] as NSValue).CGRectValue()
Let's try
from chats.
Thanks, all. @matsuosh your solution seems to work. I pushed a fix. Thanks!
from chats.
@mattdipasquale
I have learned a lot in your app.
I will be glad if I was of any help.
from chats.
@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! :-)
from chats.
Related Issues (20)
- tableView does not scroll after message send HOT 2
- Update Repository Description with technology specifics HOT 2
- Chats/MessageBubbleCell.swift:89:31: Extra argument 'scale' in call HOT 1
- error occurs when I copy try to paste copied message into textbox HOT 1
- Integrate with Lets Chat HOT 1
- TextView multi-line Dynamic height not working HOT 13
- Scrolling is glitchy HOT 1
- XCode 6.3 support
- Add Chats-Android Client HOT 9
- Add Chats-Web Client HOT 2
- how can get the code when sign up HOT 5
- Question HOT 2
- git clone error HOT 4
- App crash on iPhone4s with iOS version 7.1 HOT 1
- When I pull the code with git , some files missing HOT 1
- switch database to Nosql HOT 1
- Can not run on iphone 6 with iOS 9.3 HOT 2
- It doesn't work with Swift 3 and Xcode 8 HOT 1
- main storyboard HOT 1
- Failed to recurse into submodule path 'Clients/iPhone' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chats.