how to next detailView like in Mail-App

99封情书 提交于 2019-12-06 16:08:12

Would you like to show new detail information when click left or right button in detail Page , right?

In the Parent View Class (TableView Layout), you should create NSMutableArray that contain some specific object (ex. "MailDetailObject" that containg data1 , data2 ,data 3 ,... as you wish)

and you could keep each MailDetailObject contain each detail information and put them together to NSMutableArray in Parent View Class

and now , when you didselectRowAtIndexPath in tableView , send this NSMutableArray and your current index on tableView to DetailView (Don't forget to create this property in DetailView for refer object that send from parentView)

In the detailView , (IBAction)nextRow Method , if you click next you can refer to the next index and lookup in NSMutableArray that have sent from your parentView and get the next index information to display

hope it helps you

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!