Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Neil Faiman via swift-users
> On Apr 21, 2016, at 6:42 PM, Erica Sadun wrote: > > >> On Apr 21, 2016, at 4:37 PM, Neil Faiman via swift-users >> wrote: >> >> >>> On Apr 21, 2016, at 5:50 PM, Charles Lane via swift-users >>> wrote: >>> >>> Xcode

Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Charles Lane via swift-users
OK, I got it. Instead of string.draw(with rect: CGRect(etc. etc. etc. It’s string.draw(with: CGRect( and so on and on and on… I got no help from xcode figuring this out though! Regards, Chuck Lane ___ swift-users mailing list swift-users@swift.org

Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Jacob Bandes-Storch via swift-users
The latter. Check out the docs: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html#//apple_ref/doc/uid/TP40014097-CH10-ID166 On Thu, Apr 21, 2016 at 3:37 PM, Neil Faiman via swift-users < swift-users@swift.org> wrote: > > > On Apr 21,

Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Neil Faiman via swift-users
> On Apr 21, 2016, at 5:50 PM, Charles Lane via swift-users > wrote: > > Xcode wants to insert a comma between the words ‘with rect:’ for some reason. Is that a two-word parameter “name”, or is it just a parameter with an external name “with” and an internal name

Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Charles Lane via swift-users
Thanks Erica! Sadly I don’t have it working yet. Xcode wants to insert a comma between the words ‘with rect:’ for some reason. I’ll keep at it! Regards, Chuck Lane ___ swift-users mailing list swift-users@swift.org

Re: [swift-users] FlatMap and Casting

2016-04-21 Thread Nate Birkholz via swift-users
I would swear I had marked the optional initially with the same result, but it works, so apparently I didn't! On Thu, Apr 21, 2016 at 1:49 PM, Dennis Weissmann wrote: > Since sublayers are optional you’re calling the the flatMap function on > Optionals, which behaves

Re: [swift-users] FlatMap and Casting

2016-04-21 Thread Dennis Weissmann via swift-users
Since sublayers are optional you’re calling the the flatMap function on Optionals, which behaves differently. let layers = myView.layer.sublayers?.flatMap({ $0 as? CAShapeLayer }) // sublayers?. instead of sublayers. should fix the problem :) - Dennis > On Apr 21, 2016, at 9:53 PM,

Re: [swift-users] Trying to learn swift 3 renamification (as mattn calls it!)

2016-04-21 Thread Erica Sadun via swift-users
> On Apr 21, 2016, at 2:05 PM, Ryan Lovelett wrote: > > On Thu, Apr 21, 2016, at 03:50 PM, Erica Sadun via swift-users wrote: >> >>> On Apr 21, 2016, at 12:57 PM, Charles Lane via swift-users >>> > wrote: >>>