Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:13:14+00:00 2026-06-06T12:13:14+00:00

In my IF statement, its kinda weird, cause every time my code loops in

  • 0

In my IF statement, its kinda weird, cause every time my code loops in it, only SLOT1 is being called and displayed in my debugger, Why is it? Is there something wrong with my statement? Thanks.

    choiceSlot1 = TRUE;
    choiceSlot2 = TRUE;
    choiceSlot3 = TRUE;
    choiceSlot4 = TRUE;   

    if (slot1 != [(UIImageView*)[self.carousel1 currentItemView] tag] || twoSlot1 != [(UIImageView*)[self.carousel2 currentItemView] tag] || choiceSlot1 ) {

        NSLog(@"Slot1");
        choiceSlot1 = FALSE;

    } 
    else if (slot2 != [(UIImageView*)[self.carousel1 currentItemView] tag] || twoSlot2 != [(UIImageView*)[self.carousel2 currentItemView] tag] || choiceSlot2) {

        NSLog(@"Slot2");
        choiceSlot2 = FALSE;


    }
    else if (slot3 != [carousel1 indexOfItemViewOrSubview:carousel1.superview] || twoSlot3 != [(UIImageView*)[self.carousel2 currentItemView] tag] || choiceSlot3) {

        NSLog(@"Slot3");
        choiceSlot3 = FALSE;


    }
    else if (slot4 != [(UIImageView*)[self.carousel1 currentItemView] tag] || twoSlot4 != [(UIImageView*)[self.carousel2 currentItemView] tag] || choiceSlot4) {

        NSLog(@"Slot4");
        choiceSlot4 = FALSE;

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:13:16+00:00Added an answer on June 6, 2026 at 12:13 pm

    Because the else if is only validated in case the first if statement is false.

    Example:

    if (true) 
    {
        // Will be executed
    } 
    else if (true) 
    {
        // Will not be executed
    }
    
    if (false) 
    {
        // Will not be executed
    } 
    else if (true) 
    {
        // Will be executed
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually i have no idea how this kinda disks works. Its the first time
I tested each statement on its own and it works, but when I use
I have question regarding polymorphism about its assignment statement, for Example this is The
This is kinda weird problem we came across with my friend. We located our
Here is the code i have and its doing something, just not what i
I have a query which contains a select statement in it's where clause. My
Where should an JDBC-compliant application store its SQL statements and why? So far, I
Does anyone know if it's possible to include a range in a switch statement
I would like to know if its possible to write a nested select statment?
I am having the below statement from stored procedure. It's giving Insufficient Privileges. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.