views:

5

answers:

1

Hi
please see the code below
-(void) dataFromURL:(NSString *)url withRef:(id)ref
{
if(ref==@"Category")
Printf("category"); //I need control here but control does't come here.

else
printf("Subcategory");

}
How i will compare id datatype(ref) to a value like-Category.
when i print ref through NSLog(@"ID %@",ref); It returns as Category:0xd28f50 in angular brackets.

A: 

it's so simple.....i got it [ref isKindOfClass:[Category class]].

:)