I have an app in the app store, FractalWorks, which is based on a very old code-base. It's a big app, with quite a few screens. It was created in Objective-C before auto-synthesized properties were a thing, to give you an idea of how long ago it was created.
I wrote the app when I had a full-time gig as an independent software developer. I've since taken a day job, and support my apps in my spare time.
It still sells fairly well, and I recently used to add a section to the Wikipedia article on the Mandelbrot set on 3D images: https://en.wikipedia.org/wiki/Mandelbrot_set#3D_images_of_Mandelbrot_and_Julia_sets
I'm fluent in Auto-Layout now, but haven't taken the time to update the app's XIB files from "struts and springs" style to Auto-Layout - nor do I want to invest the time to do so if I can possibly help it.
I want to add a minor enhancement to the app that involves adding some UI elements and making one of the windows slightly taller. The minute I try to use Interface Builder to edit my XIB, it apparently silently changes it to Auto-Layout, and then complains about "Auto Layout before OS X 10.7". (It was released to the app store for OS X version 10.4, if memory serves, and I've moved the OS version up to the lowest version I could get away with in order to support legacy customers. It currently supports ≥10.6. The original, pre app-store version used even older OS versions.)
Googling this error suggests I use the file inspector on my XIB file to un-check a "Use AutoLayout" checkbox, but I don't see any such checkbox.
What am I missing?
If I use Xcode's code review button to compare the XIB file before and after editing it, various "tool version" values are changed, as well as it gaining a setting useAutolayout="YES". Editing that to read useAutolayout="NO" does not solve the problem.
All the credit goes to matt and his comment.
1. In the Navigator (left panel) go to issue navigator and click on the error.
2. In the Inspectors panel (right panel) the Size inspector will be automatically selected. Switch Layout from Automatic to Translates Mask Into Constraints.
Update: It's called Autoresizing Mask now.
3. Repeat for every occurrence of this error.
You may end up with an error not in the Illegal Configuration group like the following which opens the All Messages view in the middle and doesn't open the Size inspector.
This is a compile time error, just build/run your app again.
And also from the previously mentioned comment:
Be careful not to make any constraints, as that will cause an incoherent situation.
If you have multiple auto layout errors, which in all likelihood you will have, select all the controls in a window and perform the operation once rather than for each individual control. Repeat for each window.
Related
Here we have a preview of a window in Scene Builder behind the actual result when run with Netbeans. You can also see that my minimum sizes are set to USE_PREF_SIZE, with the values being auto-filled when I adjust the size of the window. The size difference between the windows is the first obvious difference.
Further, you'll notice that everything inside the window is smaller as well, all buttons, tables, fonts, etc.
I'm using Netbeans 8.2, Scene Builder 11.0.0, and JDK 8 update 251. Any ideas?
Figured it out! Hopefully this will be of some use to another aggravated user somewhere in the world.
The issue for me is that Windows was automatically scaling NetBeans. I found this resource for how to stop it:
Windows 10 does this for you now. Right click on your Netbeans shortcut (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\NetBeans) and select Properties. Go to the Compatibility tab and then select Change High DPI Settings. From there, check the Override High DPI Scaling box and set it to System.
I am new to programming on the Apple Mac. I have followed a programming guide supplied in the Mac Developer Library to program a basic GUI program called TrackMix. In this program you place a textbox, a vertical slider and a button control on the view window. Initially, on dragging the specific object, say the textbox, to the window, a set of alignment guides (dotted blue lines) would automatically appear on the canvas when the object is dragged over it. I dont know what has happened, but now those guides have disappeared when I execute the same action of dragging objects to the window. When the object being dragged is over the window a small green dot, with a plus sign in it, appears on the bottom of the object. I have carefully retraced my steps to be exactly the same as stated in the Developer Library, but still the problem persist. Have I, perhaps, involuntarily changed some Xcode settings or what? I am at the end of my wits! PS: I am using Xcode 7.
You have to toggle the menu item "Editor > Canvas > Snap To Guides" in Storyboard. I hope that helps
I am not sure whether this will be helpful, but I just had the same problem and the only thing which worked was re-installing Xcode (7.3) and trashing all of the Xcode preferences.
Good luck.
I see no settings at all under Size Inspector in Interface Builder, it is completely blank for my View, all labels and all buttons. I am using xcode 4.6 and have 'Use Autolayout' unchecked and the metrics (Size, Status Bar, Top Bar, Bottom Bar) are all 'None'. I need to be able to control the autoresizingmask, but why can't I see any size properties?
Once you switch to Size Inspector tab, directly under the icon there is a little header that says "View." If you hover over that some text appears that says "Show," because apparently that section can collapse down. Clicking the header should cause the options you expect to appear.
I wish they would make this more clear, because I completely missed it as well, and restarted Xcode several times.
I ran into this problem using Xcode 5.0 but upon further investigation, discovered the dysfunction ran to a higher degree - all Inspector views in Xcode were blank for every control, and the Navigator buttons didn't work either.
The culprit seems to have been a conflict in versioning. When I re-checked out trunk, Xcode returned to expected behavior.
Resizing the Xcode window made things right again for me - go figure.
This worked for me......
Clear Menu -> Recent Files
i cleared last open storyboard from Recent files
Restart Xcode
To my knowledge, the windows, labels, ... etc. are automatically retina-fied when they run on the new MacBooks with Retina Displays. That's the case with most of the apps I have (third party apps I didn't develop). However...
There is this specific app (Yummy ftp), that just looks miserable on the retina. Every single "thing" within the window is non-retina-fied. Even the window's toolbar.
In a counter example, many other apps just got automatically retina-fied (except raster images, CoreGraphics/CoreAnimation stuff, ...etc).
Showcase:
I did not scale these images. I am just screen capturing, cropping, and uploading.
As a cocoa developer, I would like to know the cause of such misbehavior, and how to avoid it.
https://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Introduction/Introduction.html, make sure the guide have be read. "An App’s High-Resolution Capability Is Available in the Info Window
Users can find out whether an app is running in low resolution by opening its Info window and looking at the “Open in Low Resolution” checkbox, as shown in Figure 1-7. Apps that aren’t Cocoa apps have this checkbox selected and unavailable (dimmed). Most Cocoa apps have this checkbox available, but not selected. A user can choose to run a Cocoa app in magnified mode if the app has usability issues related to high resolution.
Figure 1-7 The resolution option in the app’s Info window![enter image description here]
Some Cocoa apps that are not fully optimized for high resolution might have the checkbox selected and available by default. These apps will run in magnified mode unless the user overrides the default setting. Users might want to override the default if the issues related to high resolution are tolerable.
If the “Open in Low Resolution” checkbox is selected by default for your app—whether the checkbox is available (dimmed) or not—you can change the default by:
Fixing all bugs related to high resolution
Setting the NSHighResolutionCapable attribute to YES, in the Info.plist for the app, as shown in Figure 1-8.
Figure 1-8 The key that indicates an app is ready for high resolution![enter image description here]
When users update to the revised version of your app, they will be able to enjoy the high-resolution version.
If your app is optimized for high resolution, you can request that the “Open in Low Resolution” checkbox is not displayed by adding the NSHighResolutionMagnifyAllowed key to the Info.plist for your app. Then, set the key’s value to NO (Boolean value). A value of YES (the default) means that checkbox should be shown as usual."
I found an open-source application that had the exact same problems as Yummy FTP:
Audacity
After exploring the project, I realized that the application was developed in C++ for cross-platform capability, that's why it didn't support the MacBook with retina display automatically. Figuring out if it is possible or not to support the retina display is outside the scope of this question.
I think I'm missing some controls in the tool window in Xcode 4.3.2.
I created a new iOS 5 project, and my list of controls looks like this:
I noticed that I got more controls when I opened a sample project downloaded from the Apple dev site.
Then I tried to open my own project, which started out showing a code file. Then I got a huge list. But as soon as I view the storyboard, or a Xib file it reverts back to the shorter list.
In the huge list of controls, some of them doesn't look iOS-ish. I suspect that it loads the whole lot Xcode has to offer across project types (both iOS, Mac). Looks like this:
Do I need to manually load some frameworks, or similar into my project in order to get more controls?
The first screenshot shows the CocoaTouch controls, the second one shows standard Cocoa Controls. Not all of the latter ones are available on iOS/CocoaTouch. You can change the filter with the drop-down menu directly above the list ("Objects" in the first screenshot, "Object Library" in the second one)