tags:

views:

73

answers:

3

Hello, I have a question regarding nibs and how detail views are created in professional apps. I want to make an app that loads different uitextfields for each nib that is selected from a table. These textfields contain some logic that is different from each. I wanted to ask if it's possible to make one nib and change the data from thatto match all these scenarios. I'm unsure how this is done and how nib management can be done by arrays. Thanks and I hope I was clear enough :)

+1  A: 

I can only speak myself but I've moved away from nibs. When you get complex layouts that have elements disappearing and reappearing your nib/s become unmanageable. You can do a better job of keeping elements tidy and manageable in code as well as a slightly faster App (not much but its a nice bonus).

EDIT: As a very basic example just remove any details of a nib and if you class is a UIViewController subclass do this:

UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50,50,150,30);
label.text = @"Hello World";
[self.view addSubview:label];
[label release];

Very basic but hopefully this will get you on your way to developing without nibs. Note: Nibs aren't bad and if its a basic view use them but if you are having complex views you will find nibs becoming unmanageable.

Rudiger
Would I be able to show me I u knw any resources to help me manage nibs with code? Thanks
Alx
yea i get the idea. if i was to learn to use these since i agree using nibs is very unmanageable past a certain amount, do u knw any good begginers tutorial or book or anything that would take me from ur "simple easy to grasp example to a more automated and professional example...
Alx
A: 

IB / Nibs are useful for "getting started" and quick prototyping. However like @Rudiger mentions it's useful only in simple, static layouts. Usually it's only a matter of time before you'll run into limitations and find yourself having to write real code.

seand
A: 

I found this article on Cocoa With Love to be really interesting in regardless to performance of nibs vs code.

Derek Clarkson