There is also an easier way to access the view instead of dealing with the nib as an array.
1) Create a custom View subclass with any outlets that you want to have access to later. --MyView
2) in the UIViewController that you want to load and handle the nib, create an IBOutlet property that will hold the loaded nib's view, for instance
in MyViewController (a UIViewController subclass)
@property (nonatomic, retain) IBOutlet UIView *myViewFromNib;
(dont forget to synthesize it and release it in your .m file)
3) open your nib (we'll call it 'myViewNib.xib') in IB, set you file's Owner to MyViewController
4) now connect your file's Owner outlet myViewFromNib to the main view in the nib.
5) Now in MyViewController, write the following line:
[[NSBundle mainBundle] loadNibNamed:@"myViewNib" owner:self options:nil];
Now as soon as you do that, calling your property "self.myViewFromNib" will give you access to the view from your nib!
UIAlertView is a modal dialog, triggered within code, so it won't be very useful to set it up in Interface Builder. To create an alert, use code similar to the following:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error message" message:@"Error description" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
[alert release];
UIScrollView is right there within the Interface Builder library. I don't know why you aren't seeing it. Its icon is a blank white view with a grey scroller on its right side. Even by inserting such a view within your interface, you still may need to set some parameters in code to get the scrolling to work just right.
As a conceptual comment, if you want 50 labels within a scroll view, I think you might be better served by using a UITableView instead.
Best Answer
Open the view that has all the controls and labels, etc. (in Interface Builder). Select All. Then under the Editor menu, select Embed In, then Scroll View.
Note: in older Xcode versions, this is under the Layout menu, then Embed Objects In... (scroll view).