How to duplicate a .xib file?
The best way to do this is use cmd ⌘ ,shift, s on the xib or storyboard. Then save it with a new name or location.
The best way to do this is use cmd ⌘ ,shift, s on the xib or storyboard. Then save it with a new name or location.
A way to do this is to have three views in your .xib file. The first one is the normal view of your Viewcontroller with no subviews. Then you create the views for portrait and landscape as you need them. All three have to be root-level views (have a look at the screenshot) In your … Read more
Same thing happened to me. In Xcode: Editor > canvas > show bounds rectangles. This option show/hide the blue lines. If you found this one not work first time, try twice toggling the show bounds rectangles option. Some time this is not work in first time.
I wound up submitting this issue to Apple. Their response was unenlightening, and talking about possible optimizations, updating meta data for new version of Xcode and the like. I tracked 100 versions from clicking off and on the file. As Apple said, it was “optimizing” every time, but each time it simply moved some XML … Read more
(Assuming XCode 4) In the “File -> New File…” menu dialog, there is a subsection called “User Interface.” You will notice in the description of each of the sub-items, it says “An Interface Builder Document.” Those are various types of nibs. If you’re creating a new ViewController specifically, you can also choose the “Cocoa Touch” … Read more
I had this same issue and fixed it by unchecking the ‘Use Autolayout’ checkbox on the Document Inspector pane in Utilities.
Same thing happened to me. In Xcode: Editor > canvas > show bounds rectangles. This option show/hide the blue lines. If you found this one not work first time, try twice toggling the show bounds rectangles option. Some time this is not work in first time.
Make sure the cell on the .xib file know what’s the type of the cell. Select the cell on your interface builder and then on the identity inspector Subsequently associate your labels with your properties. (I think you already did that) Then I’d recommend to verify if you already loaded the .xib file on your … Read more
Here is what you can do, Change your MyCustomView class to be a subclass of UICollectionViewCell and not UIView. Remove override init(frame : CGRect),required init?(coder aDecoder: NSCoder),func xibSetup(),func loadViewFromNib() -> UIView from MyCustomView I seriously could not understand how are you using your setter and getter for mytitleLabelText and myCustomImage. If its of no use … Read more
The typical process for NIB based headers would be: Create UITableViewHeaderFooterView subclass with, at the least, an outlet for your label. You might want to also give it some identifier by which you can reverse engineer to which section this header corresponds. Likewise, you may want to specify a protocol by which the header can … Read more