简体   繁体   English

从固定视图返回时如何重新加载iCarousel?

[英]How to reload iCarousel when returning from segued View?

I have an iCarousel control embedded into a View. 我有一个嵌入到视图中的iCarousel控件。 Each iCarousel "tile" (or item) can be tapped to show a modal form sheet which contains editable data which is saved to a DB with Core Data. 可以点按每个iCarousel“平铺”(或项目)以显示一个模式表单,其中包含可编辑的数据,该数据与核心数据一起保存到DB中。

Once I make changes by pressing a "Save" button, and the view is dismissed, I would like to reload the iCarousel specific item to refresh the data in the tile that was tapped. 按下“保存”按钮进行更改后,视图被关闭了,我想重新加载iCarousel特定项以刷新被点击的图块中的数据。

Where can I put that code? 我可以在哪里放置该代码? (I put NSLogs in every event but nothing is triggered when returning from a segue. (我将NSLogs放在每个事件中,但是从segue返回时什么都不会触发。

Also, I tried using an Unwind Segue (I am targeting iOS 6.1), but if I tie my Save button to the Unwind IBAction, then the Save method I have on the View loaded via Segue is completely ignored. 另外,我尝试使用Unwind Segue(我的目标是iOS 6.1),但是如果我将Save按钮绑定到Unwind IBAction,则通过Segue加载的View上的Save方法将被完全忽略。

- (void)reloadData;

This reloads all carousel views from the dataSource and refreshes the carousel display. 这将从dataSource重新加载所有轮播视图,并刷新轮播显示。

Check Link For carousel methods 检查链接以了解轮播方法

我最终使用委托来跟踪某些内容是否发生更改,并且当某些内容发生更改时,我修改了BOOL属性,该属性将检查UnwindSegue,然后在其中重新加载轮播。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM