-(void)getWord:(NSString*)upperCaseString :(NSString *)combinedString :(NSString *)wordIndex
{
NSURL *url = [NSURL URLWithString:@"http://quicklanguages.com/materiales/quicklanguages/audios/%@/%@-%@.mp3",@"upperCaseString", @"combinedString", @"wordIndex" ];
// [tweetSheet setInitialText:[NSString stringWithFormat:@"%@",
[[_items objectAtIndex:indexPath.row] objectForKey:@"redirect_url"]]];
NSData *data = [NSData dataWithContentsOfURL:url];
audioPlayer = [[AVAudioPlayer alloc] initWithData:data error:nil];
// Now we are assigning it in an instance variable thus ARC will not deallocate it.
[audioPlayer play];
}
I make a method and passing three arguments , Now can can set these arguments with this URL .....