Domanda

I have the following method in my view-controller:

- (IBAction)itemSlider:(UISlider *)itemSlider withEvent:(UIEvent*)e;
{
    UITouch * touch = [e.allTouches anyObject];

    if( touch.phase != UITouchPhaseMoved && touch.phase != UITouchPhaseBegan)
    {
    }
    else if( touch.phase != UITouchPhaseMoved && touch.phase != UITouchPhaseBegan)
    {
    }
   ... 
}

Do I really need to link all the events one by one to my controller?

È stato utile?

Soluzione

if you are seeking to capture the value changed on slider , then you may follow up the below tutorials instead of using touch events.

http://www.techrepublic.com/blog/software-engineer/better-code-uislider-basics-for-apple-ios/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top