Issue in if/else block objective-c iPhone
I am using the below code for assigning values to my labels and imageviews but its not working properly. I am not getting the issue


    if ([child11 length] == 0) {
            
            [childButton1 setAlpha:0]; [childButton2 setAlpha:0]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
         }
        else if ([child11 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:0]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            //label1.text = child11;
            
            NSLog(@"here we are");
            
            if ([child11image isEqualToString:@"Fajar"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
                
                NSLog(@"child11image::: %@", child11image);
                
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Zuhr"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Asr"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Large"]];
                label1.text = child11;
                
                NSLog(@"child11image::: %@", child11image);
            }
            else if ([child11image isEqualToString:@"Maghrib"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Isha"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
                label1.text = child11;
            }
            
        }
        else if ([child22 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label2.text = child22;
            
            if ([child22image isEqualToString:@"Fajar"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Zuhr"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Asr"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Maghrib"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Isha"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }
        else if ([child33 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label3.text = child33;
            
            if ([child33image isEqualToString:@"Fajar"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Zuhr"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Asr"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Maghrib"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Isha"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }
        else if ([child44 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label4.text = child44;
            
            if ([child44image isEqualToString:@"Fajar"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Zuhr"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Asr"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Maghrib"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Isha"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
            
        }
        else if ([child55 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:1]; [childButton6 setAlpha:0];
            
            label5.text = child55;
            
            if ([child55image isEqualToString:@"Fajar"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Zuhr"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Asr"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Maghrib"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Isha"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
            
        }
        else if ([child66 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:1]; [childButton6 setAlpha:1];
            
            label6.text = child66;
    
            if ([child66image isEqualToString:@"Fajar"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Zuhr"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Asr"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Maghrib"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Isha"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }


Issue in if/else block objective-c iPhone
===

I am using the below code for assigning values to my labels and imageviews but its not working properly. I am not getting the issue


    if ([child11 length] == 0) {
            
            [childButton1 setAlpha:0]; [childButton2 setAlpha:0]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
         }
        else if ([child11 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:0]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            //label1.text = child11;
            
            NSLog(@"here we are");
            
            if ([child11image isEqualToString:@"Fajar"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
                
                NSLog(@"child11image::: %@", child11image);
                
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Zuhr"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Asr"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Large"]];
                label1.text = child11;
                
                NSLog(@"child11image::: %@", child11image);
            }
            else if ([child11image isEqualToString:@"Maghrib"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
                label1.text = child11;
            }
            else if ([child11image isEqualToString:@"Isha"]) {
                image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
                label1.text = child11;
            }
            
        }
        else if ([child22 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:0]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label2.text = child22;
            
            if ([child22image isEqualToString:@"Fajar"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Zuhr"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Asr"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Maghrib"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child22image isEqualToString:@"Isha"]) {
                image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }
        else if ([child33 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:0];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label3.text = child33;
            
            if ([child33image isEqualToString:@"Fajar"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Zuhr"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Asr"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Maghrib"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child33image isEqualToString:@"Isha"]) {
                image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }
        else if ([child44 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:0]; [childButton6 setAlpha:0];
            
            label4.text = child44;
            
            if ([child44image isEqualToString:@"Fajar"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Zuhr"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Asr"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Maghrib"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child44image isEqualToString:@"Isha"]) {
                image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
            
        }
        else if ([child55 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:1]; [childButton6 setAlpha:0];
            
            label5.text = child55;
            
            if ([child55image isEqualToString:@"Fajar"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Zuhr"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Asr"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Maghrib"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child55image isEqualToString:@"Isha"]) {
                image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
            
        }
        else if ([child66 length] != 0){
            
            [childButton1 setAlpha:1]; [childButton2 setAlpha:1]; [childButton3 setAlpha:1]; [childButton4 setAlpha:1];
            [childButton5 setAlpha:1]; [childButton6 setAlpha:1];
            
            label6.text = child66;
    
            if ([child66image isEqualToString:@"Fajar"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blue-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Zuhr"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Orange-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Asr"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Pink-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Maghrib"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Green-Jaanamaz-Small"]];
            }
            else if ([child66image isEqualToString:@"Isha"]) {
                image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Purple-Jaanamaz-Small"]];
            }
    
        }

