Instance Method インスタンスメソッド

doubleForKey:

Returns the double value associated with the specified key. 指定されたキーと結びつけられたdouble値を返します。

Declaration 宣言

- (double)doubleForKey:(NSString *)defaultName;

Parameters パラメータ

defaultName

A key in the current user‘s defaults database. 現在のユーザのもつdefaultsデータベースの中のあるキー。

Return Value 戻り値

The double value associated with the specified key. If the key doesn‘t exist, this method returns 0. 指定されたキーと結びつけられたdouble値。キーが存在しないならば、このメソッドは0を返します。

Discussion 議論

This method automatically coerces certain values into equivalent double values (if one can be determined). The Boolean value YES becomes 1.0 and NO becomes 0.0. An integer becomes the equivalent double (for example, 2 becomes 2.0). A string that represents a floating point number becomes the equivalent double (for example “123.4“ becomes 123.4). このメソッドは、自動的に特定の値を同等のdouble値へと強制します(もしそれが決定されることが可能ならば)。ブール値YESは、1.0になります、そしてNO0.0になります。ある整数は、同等のdoubleになります(例えば、22.0になります)。浮動小数点数を表している文字列は、同等のdoubleになります(例えば “123.4“ は、123.4になります)。

See Also 参照

Getting Default Values defaults値を取得する

Related Documentation 関連文書