简体   繁体   中英

why storyboard ui elements not showing on UIViewController in xcode 6?

I am new to IOS development. I am developing an app for IOS 8 devices. I used storyboard for my design yesterday my storyboard showing all UI design but today morning it show blank UIViewController no UI element vision please see in screen shot and very strange thing is that when i run my app all ui element visible in my device. I google but dont find any solution please help me out. Thank you in advance.

在此输入图像描述

It looks to me like you are using size class and you went into a particular size class and added these views. Now you are back in Any size class, so the views are not there (that is why they are greyed out in the document outline at the left). They are available only for that particular size class. If you switch back to it again, whatever it was, you will see them again. Basically, you have created conditional views - the condition being that they are present only when that particular size class situation is the case.

In other words, if you want your layout to apply in the general case, you want to start by creating and editing it under Any size classes. Only then do you switch to a particular size class and modify the layout for that particular size class.

when i run my app all ui element visible in my device

Yes, because on your device the particular size class situation matches the size class you were editing when you added those views. So there they are. That seems to me to prove my guess is right.

在此输入图像描述

Select install: Since all components [like label,textfield,buttons] are in disable mode, one select Installed check mark its will be enable again adjust constrain accordingly.

I have the same issue while copy a ViewController to another storyboard.

Fixed by following steps:

1: Select the viewController

2: Click on 5th Tab

3: Set the simulated size to Fixed.

在此输入图像描述

在所有xcode故事板中,大小必须相同

在我的情况下,这是由于我将alpha设置为0.0并忘记它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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