macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

inverseForRelationshipKey:

逆リレーションを返します。
-(id)inverseForRelationshipKey:(NSString *)relationshipKey:

解説

逆リレーションを返します。アップルスクリプトで使用

返り値

( id )

オブジェクト

引数

( NSString * )relationshipKey

リレーションキー

クラス

NSObject

Instance Methods

使用可能

10.0

参照

- attributeKeys
- classDescription
- toManyRelationshipKeys
- toOneRelationshipKeys

例文

-(NSNumber *) retCommand:(NSScriptCommand *)sCommand
{
        NSNumber *number = (NSNumber *)[[sCommand evaluatedArguments] 
                                                objectForKey:@"withNumber"];
        NSString *string = (NSString *)[[sCommand evaluatedArguments] 
                                                objectForKey:@"withString"];
        NSPropertySpecifier *prop =  [sCommand directParameter]; 


//NSLog([NSString stringWithFormat:@"%x",[[prop containerClassDescription] className]]);

//NSLog([NSString stringWithFormat:@"%x",[[prop keyClassDescription] className]]);

NSLog([[ self inverseForRelationshipKey:@"delegate"] description]);

		return number;
	}