Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the difference between an Window XIB and an View XIB template for iPhone OS > User Interfaces?

Tags:

xcode

iphone

Like I understand it, if I would take the View XIB, I had an Content View where I can put UI control elements inside.

But what's an Window then? Isn't that pretty much the same thing?

like image 321
Thanks Avatar asked Apr 08 '09 09:04

Thanks


People also ask

What is Xib file?

What are XIB files? From the point of view of the UI designer, XIB files contain the views or windows that you design in Interface Builder – the controls, their layout and properties, and their connections to your code. It is important to understand that on a technical level, XIB files are stored object graphs.

What is Interface Builder in IOS?

Interface Builder is a software development application for Apple's macOS operating system. It is part of Xcode (formerly Project Builder), the Apple Developer developer's toolset. Interface Builder allows Cocoa and Carbon developers to create interfaces for applications using a graphical user interface.


2 Answers

On the iPhone each app typically has one window and multiple views. In your case you would design your UI in the View XIB and at runtime that would be added to your app's window. You can use the MainWindow XIB to setup a view controller to swap views in and out of your app as needed.

For more information about windows and views see the Windows and Views section of the iPhone Application Programming Guide

like image 62
Michael Fey Avatar answered Oct 23 '22 14:10

Michael Fey


A window is two views: the frame view (which contains controls that only AppKit has access to, like the zoom, hide, close, and maximize buttons, and the title bar and proxy icon), and the content view, which you control.

If you're designing an area you're going to embed within another view, or hand off to an API that wants a view (for example, to create a panel or sheet), then use a view. If you're designing something to specifically be a window, like a document window, then use a window.

With a window, you have additional abilities to control its appearance and behavior, for example, to make it modal, give it a proxy icon, list it in the Windows menu, order it relative to other windows, etc. that you can't do with a plain view.

How Windows Work

like image 23
cdespinosa Avatar answered Oct 23 '22 13:10

cdespinosa