nib

What's up with the .NIB -> .XIB?

旧城冷巷雨未停 提交于 2019-11-28 17:47:24
What's up with the NIB->XIB change somewhere between XCode 3.0 to 3.1? Is there any difference with this name change that I should know while I go through tutorials that mention nothing but the .nib file? XIB's are very cool. they are basically an un-compiled NIB (in XML format if memory serves me) during the build process they are converted to NIB's to be deployed in the final product. Tom Dalling As I understand it, xib files are x ml n ib files. xib files are compiled into nibs when the application is built. The xib format was created because nib files don't mesh well with version control

Using XCode storyboard to instantiate view controller that uses XIB for its design

我与影子孤独终老i 提交于 2019-11-28 17:31:00
I have a UIViewController subclass that I created previously that had its controls laid out in a XIB file. I'd like to use this view controller in a storyboard now, but it seems although I can indicate a view controller's classname in the storyboard, I can't tell it to load the XIB. I'd rather not move everything from the XIB to the storyboard but keep it in its separate XIB. How can I get this UIViewController in the storyboard to load my XIB? matt Delete the View contained by the view controller in the storyboard. Then provide the view by configuring a nib file with the same name as the view

Could not load the “” image referenced from a nib

六眼飞鱼酱① 提交于 2019-11-28 17:25:44
I have no images called "" (nothing). I've gone through the .xib file of the screen where this pops up and can't find anything that would cause this. Anybody who have had the same issue? Here is the full warning: Could not load the "" image referenced from a nib in the bundle with identifier "com.blah.Blah" You can do this to check it from your storyboard, or nib. Open it as Source Code: Then "Find" the image name in it, see if it exists but already invalid in your project, probably you have deleted or changed its name, and now it doesn't seem valid. Vesuri I had the same issue and in my case

Xcode 4.5 corrupting XIBs?

北城余情 提交于 2019-11-28 17:11:27
i am using the new xcode 4.5, i have this lines of code on some view controller: DiscoverCell* cell=[table dequeueReusableCellWithIdentifier:@"DiscoverCell"]; if(cell==nil){ NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"DiscoverCell" owner:self options:nil]; cell = [nib objectAtIndex:0]; } when i run the app its throwing: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The NIB data is invalid.' on the LoadNib line, what is that? does this xcode is some apple garbage? Uncheck the "use Autolayout" highlighted in the below image. Xcode 4.5 enables

Loaded the nib but didn't get a UITableView Exception

走远了吗. 提交于 2019-11-28 14:45:32
I'm trying to load a uitableview using ECSlidingViewController methods. When I call this code: UIStoryboard* sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; UITableViewController* page = [sb instantiateViewControllerWithIdentifier:@"tableViewPage"]; CGRect frame = self.slidingViewController.topViewController.view.frame; self.slidingViewController.topViewController = page; self.slidingViewController.topViewController.view.frame = frame; [self.slidingViewController resetTopView]; while "tableViewPage" is a tableView Controller, not a view with a table. It gives me:

How to remove programmatically a tab bar item created in parent class NIB file?

感情迁移 提交于 2019-11-28 11:03:26
Within my iPhone application I have a common tab bar with three tabs that is presented from several views after pressing a button. The approach I followed was the workflow of Tweetie application, described in Robert Conn post . Note that the main controller is a navigation controller; the tab bar is placed in a view controller's NIB file of the navigation stack, and the effect of switching between tabs is handled in a delegate didSelectItem method. @interface GameTabBarController : UIViewController<UITabBarDelegate> { UITabBar *tabBar; UITabBarItem *lastGameTabBarItem; UITabBarItem

Can you swap the NIB file for a UIViewController that's already on-screen?

天大地大妈咪最大 提交于 2019-11-28 07:03:58
问题 For instance: Create a new UIVC using initWithNibName, using "nib-v1" Display it, e.g. using [(UINavigationController) nav pushViewController: myVC] Change the NIB that myVC is using to "nib-v2" So far as I can see, this is the "correct" approach to app-design for a lot of apps, when paging through information where you need two slightly different UI screens for the info being displayed. For instance, most of your pages are text, but some of them have an image too (think of an RSS reader,

How to add copyright information to a Nib file?

北战南征 提交于 2019-11-28 03:50:43
问题 I've just finished a total re-write [1] of one of Apple's example applications and I am going to release my code as source only on GitHub, under a BSD license. Adding the BSD license text to the .h and .m files is easy, and I can add copyright information to the .png assets that I will be including, but I am stumped as to how I can add the requisite license information to the xib files. XCode regenerates the files after an edit, so anything manually added to an xml comment will be stripped

Loading custom UIView from nib, all subviews contained in nib are nil?

梦想的初衷 提交于 2019-11-28 03:41:24
I have a custom UIView object with a nib that defines the view/subview layout. My outlets are connected, and when I init the object from initWithFrame: everything is in order. The problem I'm having is when I'm using IB to embed the UIView into another nib; the custom UIView appears, but none of the subviews it contains appear - in fact their symbols all resolve to nil. I have a very minimal initWithCoder: and awakeFromNib: implementation (just does logging) and my understanding is that as the nib is deserialized the subviews should at least be initialized during the process? The only

NSViewController and multiple subviews from a Nib

删除回忆录丶 提交于 2019-11-28 03:02:36
I'm having a difficult time wrapping my head around loading views with Interface Builder and NSViewController. My goal is to have a view which meets the following description: Top bar at the top (like a toolbar but not exactly) which spans the entire width of the view, and a second "content view" below. This composite view is owned by my NSViewController subclass. It made sense to use Interface Builder for this. I have created a view nib, and added to it two subviews, laid them out properly (with the top bar and the content view). I've set File's Owner to be MyViewController , and connected