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

Dave Abrahams dabrahams at apple.com
Fri Apr 22 11:56:06 CDT 2016


on Thu Apr 21 2016, Erica Sadun <erica-AT-ericasadun.com> wrote:

>     On Apr 21, 2016, at 2:23 PM, Ryan Lovelett <swift-dev at ryan.lovelett.me>
>     wrote:
>
>     On Thu, Apr 21, 2016, at 04:13 PM, Erica Sadun wrote:
>
>             On Apr 21, 2016, at 2:05 PM, Ryan Lovelett
>             <swift-dev at ryan.lovelett.me> 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
>                     <swift-users at swift.org> wrote:
>
>                     While rebuilding some apps using the new development trunk
>                     build, I figured out the naming changes to just about
>                     everything but this:
>
>                     let string = "Here is a string"
>
>                     string.drawWithRect(CGRect(x: 10, y: 10, width: 200, height:
>                     200), options: .usesLineFragmentOrigin, attributes: attrs,
>                     context: nil)
>
>                     Can someone tell me what the ‘string.drawWithRect changed
>                     to?
>
>                 @available(iOS 7.0, *)
>
>                 public func draw(with rect: CGRect, options:
>                 NSStringDrawingOptions = [], attributes: [String : AnyObject]? =
>                 [:], context: NSStringDrawingContext?)
>
>             Erica would you mind discussing/explaining how you went about
>             figuring out what this function signature was? It looked like you
>             copied/pasted it from Xcode (based on the styling). Did you just
>             know the function and go to its source?
>
>         I clicked through to the UIKit module, from there to NSString
>         extensions, and then looked for draw.
>
>     Thank you
>
>                 Not personally a fan since "with" makes no sense for a geometric
>                 boundary unlike in: or inRect:.
>
>                 -- E
>
> Sadly, I don't know any way to provide "your automatic translation offends my
> aesthetics" feedback.

Radars are the appropriate vehicle.  The framework owner can then do
explicit things to tune how the API appears.

-- 
Dave


More information about the swift-users mailing list