ios - Consecutive UIWebView load requests in viewdidload -


i know before hand going turn out dumb question, i'm new object world , ios. in trying trouble shoot problem i'm having passing audio files uiwebview safari playing 2 files 1 after rather 1 passed. created single view app , in viewdidload, added following:

- (void)viewdidload {      nsurl *audio1 = [[nsbundle mainbundle]urlforresource: @"warrenwreck" withextension:@"mp3"];       nsmutableurlrequest *audioforsafari1 = [nsmutableurlrequest requestwithurl: audio1];      [self.safari loadrequest: audioforsafari1];  // second audio file      nsurl *audio2 = [[nsbundle mainbundle]urlforresource: @"sequim" withextension:@"mp3"];      nsmutableurlrequest *audioforsafari2 = [nsmutableurlrequest requestwithurl: audio2];      [self.safari loadrequest: audioforsafari2]; } 

it plays second file only. nslog comments, not shown, show rolling through both sets of setting nsurl , load, last audio plays. have old procedural language background , maybe i'm expecting things work differently. why execute second audio file? i've swapped audio file name in each , same behavior. if comment out 1 or other, uncommented plays.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -