Re: NSByteCountFormatter in Swift
Re: NSByteCountFormatter in Swift
- Subject: Re: NSByteCountFormatter in Swift
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 04 Jul 2014 16:56:15 +0700
On 4 Jul 2014, at 16:42, Roland King <email@hidden> wrote:
> use a method which actually exists? All the methods are in the documentation and stringFromByteCount is a class method
>
> NSByteCountFormatter.stringFromByteCount( CLongLong( a ), .Binary )
>
> that method isn't an initializer and you used initializer syntax on it.
Even better:
let byteString = NSByteCountFormatter.stringFromByteCount( CLongLong( a ), countStyle: .Binary )
Thanks a lot for your help (and for your patience with a rather clueless beginner)!
Gerriet.
>
> On 4 Jul, 2014, at 5:27 pm, Gerriet M. Denkmann <email@hidden> wrote:
>
>> I tried:
>>
>> let a : UInt = 12345
>> let byteString = NSByteCountFormatter( stringFromByteCount: a, countStyle: .Binary )
>>
>> and get an error: "Could not find member 'Binary'"
>>
>> How can I get my string?
>>
>> Gerriet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden