mostre um botão para obter a resposta json igual a uma string como @ "unapproved"
Aqui estou buscando alguns clipes da API. E eu quero exibir um botão quando o status do clipe não for aprovado, então, na resposta json, atualmente eu estou mostrando "0" para "não aprovado". então agora quer exibir um botão quando
staus é "0". Eu obtive o código abaixo apenas da pilha e está funcionando bem até [park enumerateObjectUsingBlock ..] Estou recebendo resposta como estado igual a "1" e de alguns clipes "0". mas meu código não funciona após o NSSring * title, mostra o título como nulo, então me diga como obter o valor em * title
// log debugger response -- park=(__NSArrayM) * @"3 objects"
[0] (MyVideos *)
// _clip_name=(NSTaggedPointerString) * @"Kotak1"
// _state=(NSTaggedPointerString) * @"1"
// _clip_image_path=(__NSCFString *)@"1EKNA1464617788.jpg"
// status = (NSString *)nil
NSURL *url = [NSURL URLWithString:@"task=webapi.getJClips"];
park = [jsonLoader videosFromJSONFile:url];
[park enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) {
// if i add a breakpoint at above line and on this line it give me response state = "1" but on below line it crashes
//here it crashes on below line in debugger it shows title nil
NSString *title = object[@"state"];
}
// here below is code for showing hidden button after getting response "0"
if ([title isEqual:@"0"]) {
//If so, get the correct button from the enumerate idk and set hidden NO and text = title
// UIButton *button = [buttonArray objectAtIndex:idx];
// button.hidden = NO;
// button.text = title;
}