Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are Cocoa Auto Layouts Backwards Compatible?

With Xcode 4 on OS X 10.7, Lion, Apple introduced a fantastic new way of handling the spacial relationships of NIB-based UI elements: Auto Layouts.

At the top of the doc page for Auto Layouts, Apple declares:

Note: Auto Layout is available only in Mac OS X v10.7 and later. If you are running Xcode 4 in Mac OS X v10.6, Auto Layout is not available.

At first glance, one would assume that Auto Layouts either won't compile for, or run on, pre-Lion systems. However, as I reread the notice, and doc page, it began to look like Auto Layouts just don't exist in Xcode on pre-Lion systems.

So do Auto Layouts, after being compiled on a Lion-based machine, work on pre-Lion machines? I would imagine that Apple could've accomplished this by compiling down the Auto Layouts into spring/strut-like settings.

How to disable Auto Layouts in Interface Builder

like image 990
Patrick Perini Avatar asked Feb 22 '12 23:02

Patrick Perini


1 Answers

The autolayout "engine" doesn't exist in AppKit.framework on systems prior to 10.7, so your earlier thinking was correct: apps using autolayout will not run on 10.6 and earlier.

like image 182
Catfish_Man Avatar answered Sep 21 '22 12:09

Catfish_Man