TZStackView alternatives and similar libraries
Based on the "UI" category.
Alternatively, view TZStackView alternatives based on common mentions on social networks and blogs.
-
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
TLYShyNavBar
DISCONTINUED. Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of TZStackView or a related project?
README
TZStackView

A wonderful layout component called the UIStackView
was introduced with iOS 9. With this component it is really easy to layout components in a row both horizontally and vertically. Apple recommends using the UIStackView
wherever possible and resort to explicit NSLayoutConstraints
only when there is no way to do it with UIStackView
. This saves you lots of boiler plate NSLayoutConstraint
creation code.
UIStackView
requires iOS 9, but we're not ready to make our apps require iOS 9+ just yet. In the meanwhile, we developers are eager to try this component in our apps right now! This is why I created this replica of the UIStackView
, called the TZStackView
(TZ = Tom van Zummeren, my initials). I created this component very carefully, tested every single corner case and matched the results against the real UIStackView
with automated XCTestCases
.
Features
- ✅ Compatible with iOS 7.x and iOS 8.x
- ✅ Supports the complete API of
UIStackView
including all distribution and alignment options - ✅ Supports animating the
hidden
property of the arranged subviews - ❌ Supports Storyboard
So this implementation does not support Storyboard. It is meant for iOS developers who, like me, want to use the UIStackView
in our existing apps and like to layout their components in code as opposed to using Storyboard.
Setup
You basically have two options to include the TZStackView
in your Xcode project:
Use CocoaPods
Example Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.0"
use_frameworks!
pod "TZStackView", "1.2.0"
Unfortunately, using CocoaPods with a Swift pod requires iOS 8.
Use Carthage
Example Cartfile
:
github "tomvanzummeren/TZStackView" ~> 1.2.0
Run carthage
to build the framework and drag the built TZStackView.framework
into your Xcode project.
Drag files directly into your project
Alternatively (when you do want to support iOS 7) drag in the following classes from the Example folder directly into your Xcode project
TZStackView
TZSpacerView
TZStackViewAlignment
TZStackViewDistribution
Example usage
Given view1
, view2
and view3
who have intrinsic content sizes set to 100x100, 80x80 and 60x60 respectively.
let stackView = TZStackView(arrangedSubviews: [view1, view2, view3])
stackView.distribution = .FillEqually
stackView.alignment = .Center
stackView.axis = .Vertical
stackView.spacing = 25
This would produce the following layout:
See the developer documentation for UIStackView
for all other combinatins of distributions, alignments and axis. TZStackView
works and behaves exactly the same way as the UIStackView
except for not supporting Storyboard. If you do find a case where it does not behave the same way, please file a bug report.
To animate adding a view to or removing a view from the arranged subviews, simply hide or show them by adjusting the hidden
property within an animation block (as described by the UIStackView
reference docs as well):
UIView.animateWithDuration(0.5, animations: {
self.view2.hidden = true
})
Migrating to UIStackView
If at a later point you decide to make iOS 9 the minimum requirement of your app (it will happen sooner or later), you will want to migrate to the real UIStackView
instead of using this implementation. Because the TZStackView
is a drop-in replacement for UIStackView
, you simply replace:
let stackView = TZStackView(arrangedSubviews: views)
with ...
let stackView = UIStackView(arrangedSubviews: views)
... and you're good to go! You will not need to make any other changes and everything will simply work the way it worked before.
License
TZStackView is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the TZStackView README section above
are relevant to that project's source code only.