Reputation: 39
I recently redesigned a view controller in storyboard, which before the redesign was portrait. Once redesigned, it ran upside down, with no code changed. I must have pressed something but have no idea what.
How do I reorientate this upright?
Upvotes: 2
Views: 231
Reputation: 299623
This looks very much like a transform
setting, most commonly used when porting Mac code to iOS or for working with Core Text. Sometimes people use it when trying to create an inverted infinite table view (such as for chat apps or social media apps). I would expect that somewhere in your code you've accidentally applied it to more views than you meant to (maybe with a poorly considered extension). I would search your code for transform =
. Also, you'll want to check your view hierarchy (the left-hand pane with the scenes in it), and make sure you haven't embedded this in something like a scrollview (that you've then flipped in code somewhere).
It is possible to do in the Storyboard editor, but it's pretty obscure, and unlikely for you to do by accident. See https://stackoverflow.com/a/43014583/97337 for an picture of where it would be set (that question is about rotation, but flipping is very similar).
(Hopefully you have this project in version control, such as git, so you could use diffs or bisect to find out where the relevant change was.)
One more thought: don't completely discount a bug in Xcode. It's not likely, but it is possible. Do the standard stuff: quit Xcode, delete DerivedData, and try again. Probably won't fix it, but when things are really weird, it can be Xcode's fault.
Upvotes: 2