func keyboardDidShow(notification:NSNotification) {
var info = notification.userInfo
var keyboardHeight: CGFloat = (info[UIKeyboardFrameBeginUserInfoKey] as! NSValue).CGRectValue().size.height
constraintScrollViewBottomSpace.constant = keyboardHeight
}
The above code is giving me the error
Could not find an overload for 'subscript' that accepts the supplied arguments
What should I do to make it work?
var info = notification.userInfo!
Adding !
resolved the error. But what is reason for it. Explain.