メソッドをパラメーターとして別のメソッドに渡したくないので、実行が終了したときに呼び出すメソッドを知っています。出来ますか?
[self bringJSON:(NSString *)_passedValua:(NSObject *)anotherMethod];
メソッドをパラメーターとして別のメソッドに渡したくないので、実行が終了したときに呼び出すメソッドを知っています。出来ますか?
[self bringJSON:(NSString *)_passedValua:(NSObject *)anotherMethod];
コメントで@Danielが述べたように、そのためにセレクターを使用できます。基本的なスキームは次のようになります。
// Method declaration - method accept selector as parameter
- (void) bringJSON:(NSString *)_passedValua toMethod:(SEL)anotherMethod];
// Method call - create selector from method name (mind the colon in selector - it is required if your method takes 1 parameter)
[self bringJSON:jsonString toMethod:@selector(methodName:)];
// Implementation
- (void) bringJSON:(NSString *)_passedValua toMethod:(SEL)anotherMethod]{
...
if ([target respondsToSelector:anotherMethod])
[target performSelector:anotherMethod withObject:_passedValua];
}