开发者

How to reload data in UIView

开发者 https://www.devze.com 2023-03-10 09:27 出处:网络
I am working on a project in which As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put UIView on UIScrollView than after

I am working on a project in which

How to reload data in UIView

As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put UIView on UIScrollView than after UIButton on UIView. Images on UIButton come from plist. Problem is that when I delet开发者_开发知识库e the selected image from the plist I am unable to reload data so that deleted image is removed from horizontal view. Can anyone help me in reload data?


The most straight forward solution for reloading the view is to remove all the subviews from the scroll view and then only add the ones that have a corresponding entry in the plist.

You could make a smarter reload that only removes the subviews that have been removed from the plist and then moves the other views, so that there's no gap left after those views. Shouldn't be too hard.

0

精彩评论

暂无评论...
验证码 换一张
取 消