I made my first serious iPad app with Xcode3. It is a pretty simple book-like app, where the user can swipe with gestures left and right. All "pages" are UI开发者_Python百科View objects in the same Xib file. The big advantage is: I can use the same UIViewcontroller instance for all the pages, since all views are collected in an IBOutletCollection and tagged with numbers, so the current page can be switched back and forth.
After switching to Xcode 4 I can't add more than one UIView to the same xib file anymore. I only can drag it to the Project panel where a new UIView controller gets created (which is something I don't need).
In Xcode 3 I just dragged UIViews from the Library to my xib window. In Xcode 4 ist just zips back to the library and I can't add it.
What am I doing wrong? Is it new policy not to allow multiple views in a xib? I searched through a lot of examples and docs but usually they only show one view at a time.
Yes you can create multiple views. You just have to select a view from the objects library (right column) and drag it into your utilities pane (inner left column, which you probably have minimized so click the > arrow on the bottom). See the Apple Docs for a full reference on how to transition.
Of course it does!
If I may make a suggestion, make sure you expand that left side bar to give you a more familiar view:
精彩评论