views:

1242

answers:

2

Is there a general template or tutorial or web page that describes the procedure for creating a UIPickerview which selects short sound files and plays them upon selection or with a player? Thanks

+2  A: 
Noah Witherspoon
A: 

I have a uipicker with three components and want to fill the components with the content from three arrays but it doesnt work with multiple arrays when i use the modified code from above :

NSBundle *bdl = [NSBundle mainBundle]; soundArr = [[NSArray alloc] initWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"Sound One",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound1" ofType:@"wav"]],@"url",nil], [NSDictionary dictionaryWithObjectsAndKeys:@"Sound Two",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound2" ofType:@"wav"]],@"url",nil], nil];

NSBundle *bdl2 = [NSBundle mainBundle]; soundArr2 = [[NSArray alloc] initWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"Sound Three",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound3" ofType:@"wav"]],@"url",nil], [NSDictionary dictionaryWithObjectsAndKeys:@"Sound Four",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound4" ofType:@"wav"]],@"url",nil], nil];

NSBundle *bdl3 = [NSBundle mainBundle]; soundArr3 = [[NSArray alloc] initWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"Sound Five",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound5" ofType:@"wav"]],@"url",nil], [NSDictionary dictionaryWithObjectsAndKeys:@"Sound Six",@"title",[NSURL URLWithString:[bdl pathForResource:@"sound6" ofType:@"wav"]],@"url",nil], nil];

Please help ! Thanks !

sdksdksdk3