[swift-users] Trying to learn swift 3 renamification (as mattn calls it!)
Erica Sadun
erica at ericasadun.com
Thu Apr 21 14:50:12 CDT 2016
> 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?)
Not personally a fan since "with" makes no sense for a geometric boundary unlike in: or inRect:.
-- E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160421/92817b86/attachment.html>
More information about the swift-users
mailing list