a bug in iphone SDK's creation of view based xib files.
a bug in iphone SDK's creation of view based xib files.
- Subject: a bug in iphone SDK's creation of view based xib files.
- From: jon <email@hidden>
- Date: Sun, 30 Aug 2009 09:01:43 -0600
a bug in iphone SDK's creation of view based xib files. (this is
using 3.1, but other's probably apply)
steps to reproduce.
step 1.
create a new iPhone View-based Application in Xcode.
step 2.
add a new Class.. "Cocoa Touch Class" of UIViewController subclass.
step 3.
be sure to include the "option" of "with XIB for user interface."
step 4.
open the newly created XIB file in interface Builder. (change the
view's back ground color to some color that you can see easily if
incorrectly placed in the iphone simulator)
step 5.
under the view size tab in the inspector of interface builder of this
newly created "view" in the XIB, you will find it impossible to
adjust the "stretch" arrows of the autoSizing.. .
so if you compile a working app that can be rotated in the iphone
simulator. (you will need a working app that can rotate the view in
the iphone simulator)
(and have the app's view in the simulator rotate automatically),
you will see that the view is no longer sized correctly (in the iphone
simulator). (you will see the background color in the wrong places)
the part that is wrong, and can be corrected:
inside the newly created XIB file, you will find a line "<int
key="NSvFlags">256</int>" (or something similar for the number)
this makes it impossible to change the autoSizing arrows to stretch
the "view" of the new xib in interface builder... (notice the first
xib file in the new project is set correctly, but this new xib you
create with tne new class is incorrect)
if you change it instead to ""<int key="NSvFlags">274</int>" then
you regain the function of being able to size your view in the
"autosize" area, and be able to rotate your view automatically in the
running app's iphone simulator.
this "key" should be changed so that you can change the stretching
ability to the programers preference, which is some other code that i
do not know at this time. the code given hard wires the auto stretch
permanently... the incorrect code turns off auto stretch
permanently.... but the correct code should make it the programers
option to have stretching or no stretching...
Jon.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden