iphone – 如何推视图,回去看看?

iphone – 如何推视图,回去看看?,第1张

概述我想制作一个应用程序来播放iPhone上的本地音频文件,但是我遇到了一些我的代码. 我想知道如何推送视图,回到uitableviewcontroller并使用按钮(如媒体播放器中的“NOW PLAYING”按钮)返回到视图,而不需要插入任何新的字符串. 谢谢 我的代码应该怎么改? 在uitableviewcontroller .. - (void)tableView:(UITableView *) 我想制作一个应用程序来播放iPhone上的本地音频文件,但是我遇到了一些我的代码.
我想知道如何推送视图,回到uitablevIEwcontroller并使用按钮(如媒体播放器中的“Now PLAYING”按钮)返回到视图,而不需要插入任何新的字符串.

谢谢

我的代码应该怎么改?

在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];}
解决方法 如果您将视图推送到导航控制器,只需将其d出以查看下方的视图.

也就是说,您推送myDetVIEwCont的视图应该只是在背板播放器调用中d出.

- (IBAction)backtoplayer:(ID)sender {    [self.navigationController popVIEwControllerAnimated:YES];}
总结

以上是内存溢出为你收集整理的iphone – 如何推视图,回去看看?全部内容,希望文章能够帮你解决iphone – 如何推视图,回去看看?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1057025.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存