> On Feb 24, 2015, at 10:16 AM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> The following work, too (Xcode 6.1.1):
> 
>       let f1: NSNumber = font.pointSize
>       let f2 = font.pointSize as NSNumber
> 
> ...
> 
> (Things may have changed in Swift 1.2, though.)
> 


Works fine in 1.2, too.

$ swift
Welcome to Swift version 1.2. Type :help for assistance.
  1> import Foundation
  2> let f0: CGFloat = 42.0
f0: CGFloat = 42
  3> let f1: NSNumber = f0 
f1: NSNumber = Double(42)
  4> let f2 = f0 as NSNumber
f2: NSNumber = Double(42)


Marc


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to