• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSByteCountFormatter in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSByteCountFormatter in Swift (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSByteCountFormatter in Swift (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSByteCountFormatter in Swift
  • Next by Date: memcpy in Swift
  • Previous by thread: Re: NSByteCountFormatter in Swift
  • Next by thread: memcpy in Swift
  • Index(es):
    • Date
    • Thread