ipad NSViewControllers 数组
是否可以用视图控制器的对象声明一个 NSArray ? 我正在尝试使用两个按钮来调用一个数组,该数组将循环遍历并计数 20 个不同的视图。 现在,我的数组可以在单个视图应用程序中调用和显示多个图像。 我会做什么来创建一个视图控制器的 nsarray ,以便每次调用“下一个”操作方法时,都会加载一个新视图,并且本质上是通过该数组进行计数?
这是我当前在数组中列出的内容
-(IBAction)getNextView {
imageArray=[[NSArray arrayWithObjects:
[firstViewController.view],
[secondViewController.view],
[thirdViewController.view];
}
但我认为我缺少使用数组中的元素更新主视图的有效点...
谢谢!
更新 : 这就是我想要实现的目标...
is it possible to declare an NSArray withobjects of view controllers?
I'm trying to use two buttons to call an array that will loop through and count through 20 different views.
Right now, my array works in calling and displaying multiple images in a single view application.
what would i do to create an nsarray of view controllers, so that every time the "next" action method is called, a new view is loaded, and essentially, counted through the array?
This is currently what I have listed in my array
-(IBAction)getNextView {
imageArray=[[NSArray arrayWithObjects:
[firstViewController.view],
[secondViewController.view],
[thirdViewController.view];
}
But I think i am missing a valid point of updating the mainview with the elements in the array...
Thanks!
UPDATE :
This is what I am trying to achieve...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,为什么不呢,你可以用 viewControllers 的对象创建一个 NSArray
yes why not, you can create an NSArray with objects of viewControllers