Need help - Xcode - PSMultiValueSpecifier

Discussion in 'iOS Programming' started by winpiet1706, Mar 30, 2013.

  1. winpiet1706 macrumors newbie

    Joined:
    Mar 30, 2013
    #1
    Hello guys!

    I wanna implement a PSMultiValueSpecifier in my App, so Users can change the Animation of iCarousel. I tried a lot now, but i can't figure out the right code (for my ViewController.m) ..

    Maybe you can help me with that..

    I wanna have something like that:

    if(value 1 clicked) { self.photoCarousel.type = iCarouselTypeRotary; } elseif(value 2 clicked){ self.photoCarousel.type = iCarouselTypeCylinder; }

    ... and so on ( i have 6 values).

    I really hope, you can give me the code, so i can implement it

    My root.plist you can see here:
    [​IMG]
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    What do you want to have happen, what code have you tried, and what is that code actually doing?

    Are you trying to add some settings for your app to the iOS Settings application and then read the values that are set in your app?
     
  3. winpiet1706 thread starter macrumors newbie

    Joined:
    Mar 30, 2013
    #3
    Yes, excactly! :p

    I have 6 Values in my root.plist.. Now, i want to add a code to my ViewController.m.

    I think i need an if-statement there, but i don't know the syntax, because this is the first time, i work with the settings.bundle
     
  4. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    I've never done this before, but googling about it has led me to believe that to access the values set in the settings app, you should use NSUserDefaults. So try something like this:

    Code:
    switch ([[NSUserDefaults standardUserDefaults] integerForKey:@"animation_settings"]) {
        1: // Rotary...
            break;
        // Your other possibilities
    }
     
  5. winpiet1706 thread starter macrumors newbie

    Joined:
    Mar 30, 2013
    #5
    Thank you very very much! That's the code I needed ! You really helped me :) Thank you!
     

Share This Page