I know that UIStackview
is a new feature in iOS 9. If I want my app to support iOS 8 or iOS 7, does that mean I shouldn't use stack views?

- 22,696
- 11
- 95
- 109
-
no, documentation says its available in iOS 9 and later – Vinay Jain Jun 23 '15 at 18:15
-
For **June 2016** onwards, there's no reason to worry about anything below iOS9 ... https://developer.apple.com/support/app-store/ – Fattie Jun 09 '16 at 18:07
-
1@JoeBlow you mean? – Ted Jun 10 '16 at 05:58
-
Android is good in this case atleast. Provide support library for the newly released controls! – NightFury Oct 20 '16 at 12:39
4 Answers
UIStackView
is only available in "iOS 9.0 and later".
If you need to support earlier versions of iOS, check out OAStackView
, a drop-in replacement which "implements most of the features from UIStackView
" and supports iOS 7+.
A few minor features haven't been finished yet. I tried it out using the UIStackView-Playground project and it works pretty well.

- 65,323
- 19
- 161
- 287
-
2nice API! If I set one of the subviews hidden, would OAStackView adjust the constraints automatically? – Ted Jun 24 '15 at 03:26
-
-
@Ted Recently I am using OAStackView in my project. I have tested this feature by myself. – YON Feb 02 '16 at 07:35
-
Does OAStackView automatically set constraints like the UIStackView? It doesn't seem to be doing it for mine. – ML. Feb 27 '16 at 09:13
You could also check out MarkupKit (I'm the project's author):
https://github.com/gk-brown/MarkupKit
The LMColumnView
and LMRowView
classes are very similar to UIStackView
but work with iOS 8. They also have a couple features that UIStackView
doesn't have, such as the ability to set a background color and weight-based distribution.
See this article for more information:
https://gkbrown.wordpress.com/2015/09/29/using-uistackview-with-markupkit/

- 3,168
- 1
- 27
- 37
UIStackView is supported only in iOS 9+. For people looking for a backport to iOS7/8:

- 2,647
- 1
- 26
- 32