2016-05-01 5 views
0

Facebookのシングルサインオンを自分のiOSアプリケーションに統合しようとしています。私はFacebookのからの指示に従ってきたし、私はウェブ上で検索した後、次のエラーclassForCoderを使用していないとiOSのスクロールFacebookのログインボタンが表示されません

Unknown class FBSDKLoginButton in Interface Builder file. 

を取得していたアプリケーションを実行しようとすると、私は次のコードを追加しても問題が解決されますことを見出しました。

FBSDKLoginButton.classForCoder() 

私の質問は、このコードの重要性は何ですか?これはシーンの後ろで何をしますか? Apple's Foundation Framework Referenceから

答えて

0

var classForCoder: AnyClass { get } 

classForCoderOverridden by subclasses to substitute a class other than its own during coding. (read-only)

This method is invoked by NSCoder. NSObject’s implementation returns the receiver’s class. The private subclasses of a class cluster substitute the name of their public superclass when being archived.

宣言プロパティです