Questions tagged [nib]

NIB files are similar to XIB files (XCode Interface Builder), with the difference being XIB files are modified during development and NIB files are created during the build process. NIBs store static information about the interface as well as any behavior that has been implemented.

Storyboards have since succeeded NIB/XIB files as the latest UI interface tool.

1152 questions
0
votes
3 answers

How to load UILabel from UIView?

I have a problem with UILabel and UIView. In my UIViewController I load a UIView: NSArray *first = [[NSBundle mainBundle] loadNibNamed:@"customView" owner:self options:nil]; UIView *detail = [first objectAtIndex:0]; Inside the Xib of the UIView…
simox89
  • 43
  • 6
0
votes
1 answer

How to pass contextual objects to NSValueTransformer

NSValueTransformer is used to transform a value. But what if the transformation needs more contextual information? For example how can a NSValueTransformer access other objects in the nib, or access the view controller? Is this just not what…
tenfour
  • 36,141
  • 15
  • 83
  • 142
0
votes
1 answer

define the UITableViewCell out of Storyboard with NIB

I used the Json array to show data from server. when I change the CellIdentifier to @Cell which i used in CellIdentifier the pushDetailView is working and it's going to next page but when I change to CustomCell again just show the name of city and…
Ali
  • 29
  • 5
0
votes
3 answers

Cocoa: what creates the instance of a controller class linked to a NIB file?

This is a question about the inner workings of Cocoa NIB files and the supporting framework classes for them. For a handy example, please take a look at the Apple Currency Calculator tutorial:…
0
votes
1 answer

nib file custom view added programmatically is semi-transparent

I have a storyboard. I loaded a custom UIView from nib file to one of my UIViewController programatically. Opaque and alpha values are checked and 1 respectively. Even though the UIView is semi-transparent. What would be the problem here?
hasan
  • 23,815
  • 10
  • 63
  • 101
0
votes
1 answer

use nib and storyboard together: connect the nib's button target/action to a controller from the storyboard

I am making a chatting application. I have a separated nib view (ActionButtonsView) for the content of scroll view since it's difficult to edit in storyboard, and I may use different nibs for the content of the same scroll view (e.g.…
OMGPOP
  • 1,995
  • 8
  • 52
  • 95
0
votes
1 answer

Loading a nib file within a nib file

I've setup a nib file to include some basic UIView elements within a larger UIView element. Two elements are subclasses of the UIImageView class (meters to display data to the user). Anyway, in my mind I'd like to have these meters be their own nib…
Collin White
  • 640
  • 1
  • 11
  • 27
0
votes
1 answer

UIDatepicker Huge memory allocation

I have 2 Uidatepickers in my controller. when this nib gets loaded, it consumes memory of about 5mb. I tried to zero-in to the problem. It seems UIdatepickers are consuming all this. If is remove them, it takes only about 0.1mb. These datepickers…
LeXeR
  • 214
  • 3
  • 20
0
votes
3 answers

How does NSViewController avoid bindings memory leak? [have sample app]

I'm trying to implement my own version of NSViewController (for backwards compatibility), and I've hit a problem with bindings: Since bindings retain their target, I have a retain circle whenever I bind through File's owner. So I thought I'd just…
uliwitness
  • 8,532
  • 36
  • 58
0
votes
0 answers

Hiding buttons on custom number pad in iPhone app

I have a custom keypad created from a nib. On a preferences view, users can enter numbers for stream flow warnings. Numbers can be based on cubic feet per second, which is always a positive integer value. Numbers can also be based on stream gauge…
Pheepster
  • 6,045
  • 6
  • 41
  • 75
0
votes
0 answers

Can't load nib when nib name ends with number

I have created another nib file for iPhone 5 (one view controller). I have named it MainScreeniPhone5. but strange behavior is that app cant load this nib file when running on retina 4 simulator!! if I remove "5" at the end of nib it loads the…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
0
votes
2 answers

Interface builder: how to load a nib file

I am working on a project where I have created a .xib file and want to load the window created in the xib file. I have tried the following code, but to no avail: - (id) initWithWindowNibName: (NSString *) windowNibName { self = [ super…
Sankalp
  • 2,796
  • 3
  • 30
  • 43
0
votes
5 answers

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

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…
Adam
  • 32,900
  • 16
  • 126
  • 153
0
votes
2 answers

Load NSView from viewcontrollernib

So I have a viewcontroller customViewController that I placed several NSViews on top of using a nib file. I have connected those views to IBOutlet properties in the CustomViewController.h file but now I don't know what the next step is to initialize…
user1855952
  • 1,515
  • 5
  • 26
  • 55
0
votes
1 answer

What design pattern best represents the "File Owner" object in the iPhone?

I'm new to iPhone development. I'm reading that the "File Owner" in the xib is the responsible for instantiating all objects defined in the nib... some type of factory pattern comes to mind, but maybe I'm not looking at the big picture... So, what…
Padu Merloti
  • 3,219
  • 3
  • 33
  • 44