Upgraded to Xcode 9 Swift 4. Now Auto-Layout is whacked - autolayout

Just updated to Xcode 9 and converted my project to Swift 4 but one of my app screens with a tableview has begun to show as such:
I've removed all but one stack view and just placed all my elements in that one stack view with the constraints clipped to 0,0,0,0
it should look like this:
What's going on here?

This was a simple fix once I sat down and looked at it with fresh eyes.
Make sure your constraints are bounding to a view instead of another item in the view.
I cleared constraints and added a stack-view then added constraints carefully making sure it was bounding to a view.

Related

Use Autolayout Not Checked, Still get constraint errors

I do not use autolayout. My app is incredibly dynamic, in that users can drag fields onto a canvas to create forms. Therefore, I have developed my own routines to render my xibs on any device in either portrait or landscape. To do this, I make sure the Use Autolayout is not checked for the xib's view in the file inspector. In fact none of the boxes are checked (trait variations, safe area, etc). However, I continue to get constraint errors. Is this just a bug. My code works perfectly but it is quite annoying to get the plethora of warnings in the output window. This just started in the last release or two. I am using XCode 9.2 with a deployment target of iOS 11.

iOS 9 status bar appears below black bar

What is happening to my app in Xcode 7 / iOS 9?
The whole screen looks condensed, as if an iPhone 4S app is displaying on an iPhone 6. It looks normal in the iPhone 4S simulator.
I thought it was a problem with the auto layout constraints in the main storyboard, so I eventually deleted everything apart from the root view in the root view controller (blue screen), and there's still a problem with it.
I tried enabling size classes, thinking that this was the problem due to previously being disabled, but the result was the same.
Is anyone else getting this problem in their existing apps running in iOS 9?
Target>General>Launch Image Source>use asset
it will create new asset named BrandAsset, place your launch images over here. Create LaunchScreen.storyboard if already not existing and select it to Target>General>Launch Screen File.
Thanks for the answers. They pointed me in the right direction, as I wasn't aware it was anything to do with the launch screen.
I found out I had no LaunchScreen.storyboard file. Digging around in the docs led me onto this:
New projects are created with a launch screen storyboard file called
LaunchScreen.storyboard. Alternately, you can create a new launch
screen file using File > New, selecting the User Interface category,
and choosing a file type of Launch Screen.
It was weird that I had to do this, as I only started developing this app in iOS 8, and apparently this was a change in iOS 8. But with iOS 9 Apple are obviously getting more aggressive with deprecating incorrectly set up projects, and the consequences were that it was bug to my app.
The positive I guess, is that all of this forced me to at least create a launch image instead of having nothing.

plist editing in XCode 4: Can you not move rows anymore?

This one is stupid, and there's probably a ridiculously simple answer I'm just not aware of:
I'm trying to edit the plist for my Settings.bundle to implement preferences in my app. I want to tweak the order of a few groups, but I can't figure out how to move rows around. In XCode 3 you could just drag rows around to rearrange them, but it seems this no longer works in XCode 4. Short of deleting everything and re-recreating them in the correct order, how can I re-arrange the rows?
Thanks.
You can move an entry by grabbing the right side and moving it up, you just can't move it down.
I think it's an annoying gotcha that quite a few have run in to.
Check out:
How do you change a plist's root object type to NSArray in Xcode 4
and:
Change the editor Xcode 4 uses for property lists?
Basically, you can't. Changing the plist editor to textedit was the best solution for me. Also you can right click on the plist file and select "Open As > Source Code" to edit the plist raw.
It looks like the same problem is back in XCode 5. By grabbing it on the right you can drag it around, but you can't drop it anywhere. The only way I found was to open the list as source code like #Ralphleon said, which is simple enough to do if you have basic XML skills.
Update: With the new XCode that comes with Lion and iOS 5, moving rows works again.
Yes the order matters if you care about the order the preferences appear in your app settings.
I just create a new item (+) in the settings list where I would like an existing item placed. Then copy (right mouse click) that existing item and paste it on top of the new item. And then delete any duplicates.
In XCode 5.1, you can drag rows and drop them to a parent item. You can't rearrange siblings directly, but by dropping them on the parent item, the child jumps to the top among the siblings.
Check out the app PlistEdit Pro. It handles everything properly. Not free. But if you're doing lots of plist work it's essential.
Here

Adobe Flex Title Window showing mirror image of itself

I have a flex 3 application with 2 titlewindows. When I compile it with the flex 4.1 sdk in flash builder, the titlewindows show up as mirror images of themselves with all text invisible (i.e alpha = 0).
I don't know where to begin looking for a solution. Any ideas are welcome.
I've read about this happening before, sounds like it's a known issue. See the following for more info and a potential workaround: Adobe AIR: Controls flipped (mirrored) in certain build environments

sitecore template standard values layout not updating all items, layout not loading

i'm currently having a nightmarish moment with Sitecore. Basically my issues are two-fold:
1) the first time i added a standard value item to a template, and added a layout setup to it, i was thrilled, since all my items from that template were showing the layout, however now, certain items are now showing no layout at all. I tried doing presentation->layout, reset several times, but to no avail.
2) i added a new sublayout to the standard value layout to another placeholder, did publish on the template (republish everything, publish subitems), then publish on the standard values item again, just in case (should not be needed), i click on all items from the template, and they show the updated layout with the new sublayout (should be good, right?) however, i browse, both live and with preview to the pages and i am still seeing the old layout without my new sublayout.
- I added a breakpoint in the page_load of the new sublayout but it never hits, the others do
- I tried cleaning the cache on sitecore/admin/cache.aspx, but did not help
- tried recycling the app pool, restarting the web site, spreading black rooster' blood over the machine, nothing seems to helps
i am using sitecore 6.2.0 (rev. 100701), visual studio 2008 SP1, IIS7 in integrated mode
Basically the way to do it is set layout on the Standard Values, which should update all items, that haven't had their layout overwritten on the item or by a branch.
This is the key to the issue. If your items that aren't getting updated with the template standard value layout were created using a branch, check to make sure that branch does not also have layout details associated with it. If the branch has layout details in addition to the template, the two will conflict and cause really odd, frustrating behavior.
I encountered the exact same scenario, but after removing the layout details from my branch the issue went away.
Sounds strange... usually this only happens, when you have a "conflict" between layout set on Standard Values, template/branch.
Basically the way to do it is set layout on the Standard Values, which should update all items, that haven't had their layout overwritten on the item or by a branch.
I really dislike branches, so always try to avoid them (the only real use when they were Masters were for building hierarchies of items).
Could you try to look in the __layouts field (View > Raw values) of the items and see if anything is entered there?
And is it only some items or all items based on that template?

Resources