Skip to content

Repository files navigation

MockingbirdUIKit

Mockingbird is a UIKit renderer for platform independent Mockingbird DSL. The goal of this project is to provide a SwiftUI-like UI framework for older iOS versions starting from iOS 9.

Example

MockingbirdUIKit is just like SwiftUI for UIKit except that the body of your views return SomeView instead of some View to enable pre-iOS 13 compatibility.

structMyView:View{@Statevarcounter:Int=0varbody:SomeView{VStack(spacing:20){Text("\(counter)").fontWeight(.heavy).padding(20).background(Color.orange).clipShape(RoundedRectangle(cornerRadius:10)).shadow(radius:10)HStack{Button("Decrease"){self.counter -=1}Button("Increase"){self.counter +=1}}}}}
window.rootViewController =HostingController(rootView:MyView())

Status

Property Wrappers

StatusNameNotes
State
Binding
ObservedObject
EnvironmentObject
PublishedIn ReactiveKit
ObservableObjectIn ReactiveKit

Views

StatusNameNotes
Never
Optional
VStack
HStack
ZStack
Spacer
ButtonPartial
Color
Image
Text
AnyView
TupleView
EmptyView
ModifiedContent
ConditionalContent
GeometryReader
ForEachPartial
Shape
Slider
Sheet
ScrollView
Toggle
List
NavigationView
TabView
...

View Modifiers

StatusNameNotes
Padding
Frame
FlexFrame
LayoutPriority
ClipShape
Overlay
Background
FixedSize
AspectRatio
Offset
Shadow
Gesture
EnvironmentValue
EnvironmentObject
EdgesIgnoringSafeArea
Animation
Transaction
RotationEffect
ProjectionEffect
TransformEffect
ProjectionEffect
OnAppear
OnDisappear
...

Shapes

StatusNameNotes
Path
Rectangle
RoundedRectangle
Circle
Ellipse
Capsule

Shape Styles

StatusNameNotes
Color
FillStyle
StrokeStyle
ForegroundStyle
ImagePaint
Gradient
...

Gestures

StatusNameNotes
TapGesture
LongPressGesture
RotationGesture
DragGesture
...

Installation

SPM

Add https://github.com/DeclarativeHub/MockingbirdUIKit.git as a dependency.

Carthage

github "DeclarativeHub/MockingbirdUIKit" "master"

About

UIKit renderer for Mockingbird DSL

Resources

Stars

26 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages