interface-builder

Unknown class info in Interface Builder file

对着背影说爱祢 提交于 2020-01-02 01:07:32
问题 like in the title i got a crazy massage and i cannot handle with it Unknown class info in Interface Builder file. Every time I run my Project some crazy bugs will appear or some bars disappear. Did anyone know what to do? 回答1: Try this, in order: Product->Clean in Xcode Delete the app from the simulator or device Restart Xcode (Build &) Run again If this doesn't help, you likely have a reference to a class in the nib or storyboard that you have to manually find and remove. 回答2: The warning

UIScrollView is cut off from UITabBarController

∥☆過路亽.° 提交于 2020-01-01 11:55:09
问题 I have a UIScrollView that I place inside of a view (interface builder document .xib/.m/.h), however the lower portion of the UIScrollView is getting clipped and not showing the lower half of itself because of a UITabBarController I have. I implemented the UITabBarController in the appdelegate file, so there is no UITabBarController that is seen in the XIB, however if I place another UITabBarController in the XIB to simulate the one i've already created, I will get two when I test the

Do I still need low-resolution images for using Interface Builder when developing iPhone app for iOS 7?

与世无争的帅哥 提交于 2020-01-01 08:46:26
问题 I started to develop an iPhone app for iOS 7. Since iOS 7 does not support devices with non-retina display for the iPhone/iPod touch, and it uses high-resolution images on non-retina iPads (iPad 2 and iPad mini) in the iPhone emulation mode, now I think we don't need to provide low-resolution images when developing an iPhone-only app which deployment target is iOS 7. I thought it's great, but soon I faced a problem when I used a Storyboard; apparently Interface Builder can not display high

Images for retina display iphone

删除回忆录丶 提交于 2020-01-01 04:26:08
问题 I have an working application which i have tested in my ipod touch. Everything works pretty fine. My tabbar icons and splash screen images are in a separate folder in my Resources folder Resources->images Now, I know for iPhone4 i need to use 2x images. My question is for support for iPhone4 all that i need to do is add 2x images in my images folder. For example if my splashscreen image is Default.png , I should add my 2x image as Default@2x.png in my images folder and iphone will use it

Equivalent of dynamic type “automatically adjusts font” setting for UIButton in Interface Builder?

自古美人都是妖i 提交于 2020-01-01 04:16:04
问题 A UILabel has a Dynamic Type: Automatically Adjusts Font check-box in the Attributes Inspector in Interface Builder. Is there an equivalent in Interface Builder for automatically adjusting the font size of a UIButton, or does this have to be handled in code? I'm using Xcode 9.0 beta 6, targeting iOS 11. 回答1: Apparently there isn't, but it's not very hard to fix. You can make an extension on UIButton with an @IBInspectable property: extension UIButton { @IBInspectable var

Designing UICollectionView cells in nib with Interface Builder (without storyboard)

喜夏-厌秋 提交于 2020-01-01 03:52:26
问题 I am trying to design a custom UICollectionViewCell prototype (in Xcode 5.0.2), however Interface Builder doesn't let me add a cell to my UICollectionView while designing a nib. I can set the number of items (cells) and Interface Builder creates and displays cells perfectly if I'm using storyboard, but I can't add a cell to my collection view in a nib. I've tried: Drag and dropping collection view cell into collection view manually from the object library. (fails: doesn't let me drop the cell

Convert NIB Files to XIB Files

∥☆過路亽.° 提交于 2019-12-31 22:30:23
问题 Is there a way to convert NIB files to XIB files so that I can open them in Xcode 4? Once I have edited them, is there a way to convert them back to NIB ? 回答1: Once a nib file has been flattened and stripped (which is now a default part of the compilation process), then it is challenging to open it in IB. You may want to look at NibUnlocker, which is useful in converting a flattened nib file into xib, but it is not a lossless round-trip and it may not even work in all cases. As with most

UITextView resign first responder on 'Done'

笑着哭i 提交于 2019-12-31 21:32:47
问题 I have been searching around the web for about an hour now, and cannot find any code to help me with this. I have a UITextView that I need to resign first responder of when the user presses the 'Done' button on their keyboard. I have seen code floating around the internet like this: -(BOOL) textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return NO; } But that will not work for a UITextView . Simply put, How can I tell when the user presses the done button on

How to load a NIB inside of a view in another NIB?

浪子不回头ぞ 提交于 2019-12-31 21:22:31
问题 I have two NIB's ParentViewController.xib ChildViewController.xib ParentViewController.xib contains a UIView and a UIViewController. ChildViewController.xib contains a UIButton I want ChildViewController.xib to load in the ParentViewController.xib's UIView I have done the following: Created @property for UIView in ParentViewController Connected File's Owner to UIView in ParentViewController Set UIViewController in ParentViewController's NIB Name property to ChildViewController in Interface

IBDesignable view causes endless rebuilding

心已入冬 提交于 2019-12-31 19:29:14
问题 I'm writing a UIView subclass that uses both IBInspectable and IBDesignable. I'm not doing anything unusual, but my subclass causes Xcode 6.2 to endlessly rebuild the project. My Identity Inspector shows this state oscillation under the heading 'Designables': Every time the build restarts, the inspector loses focus. This makes it hard to edit anything from IB, which defeats the purpose of writing this class in the first place. Here is the implementation of my DesignableTestView: import UIKit