ios - else condition is not executing? -


in following else if ,the last else condtion not executing ?

please me

if (flag==1) {     ... } else if ([totalbooksid containsobject:currentbook]) {     ... } else if (![totalbooksid containsobject:currentbook])  {     ... } else {     ... } 

all variable have values still else not executing. above else statement not executing @ all? please me

this work

  if(flag==1){         if([ownlist containsobject:currentbook]){             if(fileexists) {                 [self renamereadbutton];             }else if(!fileexists){                 [self renamedownloadbutton];             }             [self renamelendbutton];         }       }          else if([totalbooksid containsobject:currentbook]){                       //checking bought books                     if([ownlist containsobject:currentbook]){                          if(fileexists){                             [self renamereadbutton];                         }else {                           [self renamedownloadbutton];                         }              } else{          [self renamebuybutton];          }                           }     else if(![totalbooksid containsobject:currentbook]) {                         if([freelist containsobject:currentbook]){                         if(fileexists){                                                             [self renamereadbutton];                         }else{                                                  [self renamedownloadbutton];                         }                                             }  else{          [self renamebuybutton];      }                            }                

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -