ios - Read UI Label Value and Perform some tasks -
i'm creating radio application 5 radio stations. i've included rotary wheel select preferred station. use label view display selected station. when user presses play button how can selected value play defined url.
i've defined 5 url's already, not sure how play button play the selected station @ url when user presses play.
if looking play multiple urls, create method plays them switch-case statement.. such following
- (void) playmusicatindex:(int)index { switch(index) { case 0: // play url 1; break; case 1: // play url 2; break; case 2: // play url 3; break; … } }
then, when going off selected option url of radio, set url @ index number, , (inside method)
[variablename playmusicatindex:0..or 1.. or 2, whatever index you're playing];
hope helps!