按下按钮时为单个视图添加子视图
我正在创建一个项目,在视图顶部它将在滚动视图上有按钮,如下所示 < [1] [2] [3] [4] [5] >,默认情况下我会将第一个视图显示为子视图。但是按第二个按钮我应该得到第二个视图。同样,我应该通过单击按钮来获取所有页面。我有一个解决方案,我想为每个单独的部分创建视图,但这可能会导致内存问题。请为我提供任何解决方案。
I am creating a project that on the top of view it will have buttons on scroll view like this < [1] [2] [3] [4] [5] >, defaultly i will display the first view as sub view. But by pressing second button i should get second view. Similarly i should get all the pages by clicking buttons. I am having one solution that, I want to create view for every individual part but it may cause memory issues. Please, provide me any solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果仅在需要时创建视图,并且在切换到另一个视图之前适当地释放视图,则不会导致内存问题。
另外,请将此问题标记为 Objective C 问题。
It should not be causing memory issues if create your views only when they're required and if you release your views appropriately before switching to another view.
Also, please kindly tag this question as an Objective C question.