मैं आईफोन पर स्थानीय ऑडियो फाइलों को चलाने के लिए एक ऐप बनाना चाहता हूं लेकिन मैं अपने कुछ कोडों से फंस गया हूं। मैं सोच रहा हूं कि आप एक दृश्य को कैसे दबा सकते हैं, uitableviewcontroller पर वापस आएं और किसी भी नई स्ट्रिंग को दबाए बिना दृश्य पर वापस आने के लिए एक बटन (जैसे "प्लेयर प्लेयर में" अभी खेलना "बटन) का उपयोग करें ..दृश्य को कैसे धक्का दें, वापस जाएं और दृश्य पर वापस आएं?
धन्यवाद आपको
मुझे अपने कोड से क्या बदलना चाहिए?
uitableviewcontroller में..
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath {
selectedSong = [directoryContent objectAtIndex:indexPath.row];
NSString *storyLin = [[directoryContent objectAtIndex:[indexPath row]] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
patch = [NSString stringWithFormat:@"/%@", storyLin];
myDetViewCont = [[mPlayerViewController alloc] initWithNibName:@"mPlayerViewController" bundle:nil];
myDetViewCont.myProgLang = selectedSong; // assigning the correct value to the variable inside DetailViewController
[self.navigationController pushViewController:myDetViewCont animated:YES];
[myDetViewCont release]; // releasing controller from the memory
}
mPlayerViewController.m
-(IBAction) backtoplayer{
myDetViewCont = [[mPlayerViewController alloc] initWithNibName:@"mPlayerViewController" bundle:nil];
}
अद्भुत !!!! आप दोनों दोस्तों को धन्यवाद! लेकिन जब मैं uitableviewController में किसी पंक्ति (गीत) पर क्लिक करता हूं तो हर बार एक नया mplayerViewController को कैसे बनाया जा सकता है? '(शून्य) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { myDetViewCont = [[mPlayerViewController alloc] initWithNibName: @" mPlayerViewController "बंडल: शून्य]; ' – Alby