I want to know how to handle the class NSCFSring.

Asked 2 years ago, Updated 2 years ago, 69 views

We were able to retrieve Twitter account information from ACAccountStore in an array as follows:

let accountStore=ACAccountStore();
    let twitterAccountType=accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter);
    accounts=accountStore.accountsWithAccountType(twitterAccountType);

When I got the user_id of Twitter from the account information I got, it seemed that an object in the class NSCFSring was returned.

for account accounts{
        println(ac.username)
        println(ac.valueForKeyPath("properties.user_id")!)//<- Here
    }

I wish I could cast it on String, but I don't really understand NSCFSring.
Please let me know if you have any suggestions on how to cast it.

Thank you for your cooperation.

swift ios8 twitter

2022-09-30 10:42

1 Answers

__NSCFSstring is a derivative class of NSSstring, so no cast is required.


2022-09-30 10:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.