xib

How to convert a project using XIBs to Storyboard?

纵然是瞬间 提交于 2019-12-05 20:36:00
问题 I have some complex XIB files in a project using TabBarViewControllers containing navigation controllers. Since Xcode 4.2 I cannot edit those XIB files usefully anymore: the contained view controllers are invisible, only represented as grey boxes. It seems that in Storyboard projects this is the default, and the next layer in the storyboard shows the details of the contained views / view controllers. So how can I switch my project to use a storyboard instead? 回答1: The objects are grayed out

Since XCode 6.3 -> Nib could not be loaded [duplicate]

淺唱寂寞╮ 提交于 2019-12-05 18:19:26
This question already has an answer here: Xcode 6.3: Could not load NIB in bundle 4 answers I updated my XCode from 6.2 to 6.3 today. I adapted all the swift changes, but when I run the application, I get errors for every NIB I try to load that has ~ipad or ~iphone . (NIB could not be loaded) Nibs that don't have that device modifier load as usual. If I remove the ~iphone or ~ipad , the nib can be found again, but obviously thats no solution, because it's an Universal App. Same goes for every other file type, that I try to load via code e.g. storyboards. hypercrypt Seems to be related to size

Performance penalty for using NIB files?

前提是你 提交于 2019-12-05 11:56:23
I am curious to know if anyone has any experience comparing the load time performance of iPhone apps with views laid out in NIBs vs. views laid out entirely programmatically (i.e. instantiating UITextView, adding it to the view, instantiating UIButton, adding it to the view…). If I want a simple app to load lightning fast, would it be better to forgo using a NIB (well, XIB technically) and instead create view elements programmatically? Is the time spent loading and parsing a NIB sufficient enough to make a noticeable difference? I've noticed that loading complex interfaces on the iPhone with

Localization strings file not working with xib in Xcode 5

允我心安 提交于 2019-12-05 10:12:38
I have the following file structure for localization. A.xib ->A.xib (Base) ->A.strings (Spanish) ->A.strings (English) Since it is "Use Base Internationalization". We can expect to have only one xib file and required strings file for the localization. But, soon as i convert this strings file to .xib (where for each language we have .xib file. This was the case before Base Internationalization). Things start working the iOS simulator and device responds to such changes. Note:- I had also tried to reset the simulator , clean and created the build but no success. Don't know why localization fails

Move all subviews to container view keeping positions and constraints

一曲冷凌霜 提交于 2019-12-05 09:20:23
问题 I'm using Xcode 5 and autolayout in my project. I have a .xib file with a lot of subviews and constraints between them. Now I need to create an intermediate fullscreen container view and put all subviews there. So now I have view->subviews , and I want view->container view->subviews . When I do this in IB by dragging subviews into container view, they all get centred and all constraints get lost. It's going to be a little hard to restore all constraints manually. Is there a smart way to do

xcode storyboard - ibtoold unarchiving exception

心已入冬 提交于 2019-12-05 08:02:25
the exception is; CompileStoryboard Catwall/en.lproj/MainStoryboard.storyboard cd /Users/guvenozyurt/Desktop/git/catwall_ios setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 5.1 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/.. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --errors --warnings --notices --output-format

How to use custom UIView subclass in XIB editor with Monotouch?

无人久伴 提交于 2019-12-05 07:26:42
I have added a XIB based UIViewController to my solution and dragged some UIViews into it. Now I want some of the views not to be UIView but RoundedRectView (https://github.com/Krumelur/RoundedRectView) which inherits from UIView . How to achieve this? I tried to change the class in Interface Builder but that did nothing. Then I manually modified the designer.cs file but that resulted in a failure. Then I tried modifying the fake ObjC code but that failed too. (I'm using Xcode 4.2 and MD 2.8.6.4) Dimitris Tavlikos Your view subclass needs at least two things: Register attribute [Register(

Adding constraint to the “main view” in a xib

百般思念 提交于 2019-12-05 06:17:41
I have a UIView defined in a .xib file. I need to set translatesAutoresizingMaskIntoConstraints = NO . This means that the frame is not translated to constraints so I need to set the size constraints by myself. I have created a working category method for a UIView : -(NSArray*)setSizeConstraints:(CGSize)size { NSLayoutConstraint* height = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeHeight relatedBy:0 toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:size.height]; NSLayoutConstraint* width = [NSLayoutConstraint constraintWithItem:self

UIViewController IBOutlets are nil

北城以北 提交于 2019-12-05 05:11:48
I have an UIViewController class with two labels and a UIImageView set as IBOutlets, and I have this outlets connected in my xib, I have double checked they are connected properly, however when I check the their value in the debugger they are 0x0 so I cant change them programatically. Any ideas on what I might be doing wrong. Heres the header file of my code: #import <UIKit/UIKit.h> @interface PlateDetailViewController : UIViewController { IBOutlet UIImageView *image; IBOutlet UILabel *price; IBOutlet UILabel *description; } @property (nonatomic, retain)IBOutlet UIImageView *image; @property

Swift 3 Load xib. NSBundle.mainBundle().loadNibNamed return Bool

孤者浪人 提交于 2019-12-05 04:49:06
I was trying to figure out how to create a custom view using xib files. In this question the next method is used. NSBundle.mainBundle().loadNibNamed("CardView", owner: nil, options: nil)[0] as! UIView Cocoa has the same method,however, this method has changed in swift 3 to loadNibNamed(_:owner:topLevelObjects:) , which returns Bool , and previous code generates "Type Bool has no subscript members" error, which is obvious, since the return type is Bool. So, my question is how to a load view from xib file in Swift 3 First of all the method has not been changed in Swift 3 . loadNibNamed(_:owner