Panda alternatives and similar libraries
Based on the "UI" category.
Alternatively, view Panda alternatives based on common mentions on social networks and blogs.
-
DZNEmptyDataSet
DISCONTINUED. A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display -
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
folding-cell
:octocat: đ FoldingCell is an expanding content cell with animation made by @Ramotion -
SkeletonView
â ď¸ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting -
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 -
TTTAttributedLabel
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more -
MGSwipeTableCell
An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application) -
JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users -
XLForm
XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C. -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner ViewăProduct ShowăWelcome/Guide PagesăScreen/ViewController Sliders. -
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. -
Alerts & Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
PageMenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SWRevealViewController
A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right ! -
Material Components
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
expanding-collection
:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion -
CSStickyHeaderFlowLayout
UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7.
SaaSHub - Software Alternatives and Reviews
* 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 Panda or a related project?
README
Create view hierarchies declaratively.
Quick Look
view.pd.add(
imageView.pd.image(logoImage),
label.pd.text("Logo").textColor(.red).font(size: 20),
button.pd.title("Go").action(buttonTapped)
)
Itâs much shorter and concise than the imperative API, and easier to edit than storyboards.
Installation
Carthage
github "wordlessj/Panda" ~> 2.0
CocoaPods
pod 'Panda', '~> 2.0'
Usage
Basics
ALL settable properties and set methods in UIKit and Core Animation are available in pd
extension, set
prefixes are removed.
Views are configured and added to a superview as you see in Quick Look, you can also nest add()
to create a more complex hierarchy, note that configuration by pd
is optional.
view.pd.add(
containerView.pd.clipsToBounds(true).add(
view1.pd.backgroundColor(.red)
),
view2
)
Other types that can be added by add*()
methods are also supported, like UIGestureRecognizer
and UILayoutGuide
. Donât put them all in one add()
method, grouping is recommended.
view.pd.add(
// view hierarchy
).add(
layoutGuide.pd.identifier("center guide")
).add(
tapGestureRecognizer.pd.numberOfTapsRequired(2).action(doubleTapped)
)
Objects can be configured inline and passed to a method, if the method accepts a *Convertible
.
// mask() accepts a UIViewConvertible.
// You can pass a plain or configured UIView.
view.pd.mask(
maskView.pd.backgroundColor(.white)
)
Add and Remove
add()
and remove()
methods are available on types below, followed by types that can be added. remove()
is basically used to remove multiple object at once without configuration.
Type | Types which can be added |
---|---|
CALayer |
CALayer , CAAnimation |
UIAlertController |
UIAlertAction , UIViewController , UIKeyCommand |
UIDynamicAnimator |
UIDynamicBehavior |
UIDynamicBehavior |
UIDynamicBehavior |
UIView |
UIView , UIGestureRecognizer , UIMotionEffect , NSLayoutConstraint , UILayoutGuide , UIInteraction |
UIViewController |
UIViewController , UIKeyCommand |
UIView
is added toUIStackView
usingaddArrangedSubview()
.
Custom Properties
With smart key paths, you can use set()
to set custom properties not found in Panda.
customView.pd.set(\.flashes, true)
Action
Target-actions are replaced with action()
taking a closure. Theyâre available on following types.
CADisplayLink
, an initializer instead ofaction()
.UIAccessibilityCustomAction
UIBarButtonItem
UIControl
UIGestureRecognizer
Font
UIFont
factory methods are available directly as following methods.
font(style:)
font(style:compatibleWith:)
font(size:)
font(size:weight:)
font(boldSize:)
font(italicSize:)
font(monospacedDigitSize:weight:)
Theyâre available on following types.
UIButton
, set font oftitleLabel
.UILabel
UISimpleTextPrintFormatter
UITextField
UITextView
Transform
Thereâre several convenient methods to set transform on UICollectionViewLayoutAttributes
and UIView
. Each of them has a corresponding concat*()
method to concatenate a transform to existing transform.
rotation(radian:)
rotation(degree:)
scale(x:y:)
scale(_:)
translation(x:y:)
Control States and Bar Metrics
For set methods taking a UIControlState
or UIBarMetrics
like title(_:for:)
, thereâre convenience methods to set for all states or metrics like title(_:highlighted:selected:disabled:)
, the first parameter is for normal state, and the other parameters are optional.
Compositions
For convenience, thereâre several composition methods which set multiple properties at once.
Types | Composition | Components |
---|---|---|
CALayer |
border |
borderWidth , borderColor |
CALayer |
shadow |
shadowOpacity , shadowRadius , shadowOffset , shadowColor , shadowPath |
UICollectionView , UIPageViewController , UIPickerView , UITableView |
sourceDelegate |
dataSource , delegate |
UILabel |
shadow |
shadowColor , shadowOffset |
UIScrollView |
alwaysBounce |
alwaysBounceHorizontal , alwaysBounceVertical |
UIScrollView |
showsScrollIndicators |
showsHorizontalScrollIndicator , showsVerticalScrollIndicator |
UIView |
border |
layer.border |
UIView |
cornerRadius |
layer.cornerRadius , layer.masksToBounds to true |
UIView |
shouldRasterize |
layer.shouldRasterize , layer.rasterizationScale to screen's scale |
UIView |
shadow |
layer.shadow |
Set-Like Methods
Some methods donât begin with set
but are usually called while configuring, they are available as well.
UIAlertController.pd.addTextField(configure:)
UIGestureRecognizer.pd.require(toFail:)
Register and Dequeue
For UICollectionView
and UITableView
, an identifier is required when registering and dequeuing cells and views, and force casting to a specific type is usually needed. In practice, one identifier is associated with one specific type, so you can use the type itself instead of an identifier.
collectionView.pd.register(CustomCell.self)
let cell: CustomCell = collectionView.pd.dequeue(CustomCell.self, for: indexPath)
Reuse
If more than one object share similar configurations, or you want to create something like CSS, you can extract configurations into a method, then apply the method using do()
.
view.pd.add(
firstLabel.pd.do(configLabel),
secondLabel.pd.do(configLabel)
)
func configLabel(_ label: UILabel) {
label.pd.textColor(.red).font(size: 20).numberOfLines(0)
}
Bamboo
Bamboo is a framework which makes Auto Layout and manual layout in one line, together with Panda, they make creating views in code incredibly simple and easy.
License
Panda is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the Panda README section above
are relevant to that project's source code only.