图像并非全部显示在模拟器上,而是显示在故事板中 [英] Images not all showing up on simulator but shows in storyboard

查看:37
本文介绍了图像并非全部显示在模拟器上,而是显示在故事板中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 iOS 开发的新手,我在 Xcode 4.5.2 的故事板中闲逛.我开始了一个新的标签栏项目(5 个标签),然后将一些图像(UIImageViews 对象)放入其中,一切看起来都不错,并且在模拟器上构建效果很好,但并非所有图像都显示出来.相同的图像将显示在 Firstviewcontroller 上,但不会显示在另一个 viewcontroller 上.而且我似乎无法将新的图像对象添加到第一个中(这意味着我可以将它放在情节提要中,但新的图像对象不会出现在模拟器上),它几乎似乎在显示缓存屏幕.例如,我只是将图像随机放置在一个视图控制器上,然后将它们移动并再次运行模拟器,但位置不匹配.

I am pretty new to iOS development and I was poking around in storyboard in Xcode 4.5.2. I started a new tab bar project (5 tabs) and then dropped in some images (UIImageViews objects) to them, everything looked good and the build came out fine on the simulator but not all the images are showing up. The same image would be showing on the Firstviewcontroller but it won't show on another viewcontroller. And I can't seem to add new image objects into the firstone (meaning i can place it in the storyboard but new ones won't show up on the simulator), It almost seems to be showing cached screens. For example, I just randomly place images all over a viewcontroller and then shifted them around and ran the simulator again but the positions do not match.

有没有人在 Storyboard 上有任何信息或经验?

Does anyone have any information or experience with this on Storyboard?

提前致谢.雷

推荐答案

在我的情况下,当我在 Xcode 6 中创建新项目时,我无法在模拟器和设备.我已经导入了图像资产中的所有图像,并在其中创建了一个文件夹.现在我已经导入了所有图像,现在一切正常.现在显示所有图像.

In my case when I have created new project in Xcode 6 I can not show the images in the Simulator and as well as in device. I have imported all the images in the image assets making a folder within that.Now I have imported all the images, all are working fine now. All images are now showing now.

请按照以下步骤操作:

第 1 步:

第 2 步:

第 3 步:

然后导入您需要的图像.参考链接:StackOverflow 链接

and then Import images which you need. Reference Link: StackOverflow link

这篇关于图像并非全部显示在模拟器上,而是显示在故事板中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆