xcode 4.2.1 failure message - what does it mean?

Discussion in 'iOS Programming' started by Halfdan, Dec 4, 2011.

  1. Halfdan macrumors newbie

    Joined:
    Dec 4, 2011
    #1
  2. mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #2
    Can you post more of your code? It's unclear from the very small amount of code you've posted what the problem might be. Also, the screenshot of the error is nice, but please post the rest of your code as text, not screenshots.
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    Name your property something else than value.

    There is apparently another method with the same name, possibly in your code possibly in the framework headers, with a method of the same name that returns a different type. This causes the compiler some confusion. The solution is to never have methods with the same name that take or return different types.
     
  4. Halfdan, Dec 4, 2011
    Last edited by a moderator: Dec 5, 2011

    Halfdan thread starter macrumors newbie

    Joined:
    Dec 4, 2011
    #4
    Hey guys...

    Thank you for helping me.

    I can't seem to rename the property since it's a slider, and can't be ''unlocked'' - very confusing :confused:

    Here is more of the code:
    Code:
    - (IBAction)HundeaarSliderAction:(id)sender {
    
        float HundeAlder = [(UISlider *)sender value];
        [sender setValue:HundeAlder];
        
        hundeaar.text = [NSString stringWithFormat:@"%d hundeaar", (int)HundeAlder];
        hundeaar.text = [NSString stringWithFormat:@"%d hundeaar", (int)HundeAlder*7];
        
        
    
    
    
    }
    @end
     
  5. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    Right. You can't change the header for UISlider. So you have added a property with the same name to one of your classes. Change that name.
     

Share This Page