I am using size classes to create a storyboard that can target all the various screen sizes and orientations. I have been working in the Any Width-Any Height size class. I ran into a display issue and decided to make those changes in the Compact Width - Regular Height size class. At a Later time, I was able to resolve my layout issue by making constraint changes to the Any Width-Any Height size class. How can I revert the changes made to the Compact Width - Regular Height size class so that the Any Width-Any Height size class will be used at runtime without manually reverting the changes?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
I had a similar problem where I edited a few constraints for the iPad in the wrong size class (Any Width - Regular Height instead of Regular Width - Regular Height) and it ended up messing up the layout for portrait iPhone. I ended up editing
Base.lproj/Main.storyboard
and changed the appropriate<variation>
entries to move the constraints to the proper size class (in my case, from<variation key="heightClass=regular" ..>
to<variation key="heightClass=regular-widthClass=regular ...>
. There must be a better way to do this, but this quick hack solved my problem in that occasion. To remove variations, deleting the corresponding variation entries should work (but make sure you have a backup in case something goes wrong).XCODE7...
I had a similar problem with images added while in Regular Width (rather than "Any") not appearing when I switched it back to "wAny hAny" size.
I found in the Main.storyboard file, when viewed as code rather than visually, a section for the view in question as follows:
It appears that the section refers to the "Any-Any" case, and the refers to the specific Size Class I was playing with (being Regular Width, Any Height).
To fix it I DELETED the items EXCLUDED from the default section, and DELETED this same entries that had been added to the regular section. That section of the code then looks like...
Seems to fix it. Whacky, eh?