Re: Obj-c to Swift conversion question

2015-07-28 Thread Eric E. Dolecki
Yes, thanks. I ended up with this (yes, I like to use Void): func keyboardWillShow(notification:NSNotification) -> Void { let userInfo = notification.userInfo! let keyboardEndFrame = (userInfo[UIKeyboardFrameEndUserInfoKey] as! NSValue).CGRectValue() let animDuratio

Re: Obj-c to Swift conversion question

2015-07-28 Thread Jean-Daniel Dupas
> Le 28 juil. 2015 à 16:03, Eric E. Dolecki a écrit : > > The more I stretch to Swift goals, the more I learn. However I've come upon > a little thing where I am translating code into Swift and quickly stumbled. > > *Obj-C:* > NSValue *keyboardEndFrameValue = [[notification userInfo] > objectFo

Obj-c to Swift conversion question

2015-07-28 Thread Eric E. Dolecki
The more I stretch to Swift goals, the more I learn. However I've come upon a little thing where I am translating code into Swift and quickly stumbled. *Obj-C:* NSValue *keyboardEndFrameValue = [[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey]; *Swift (the closest I've come):*