Skip to content

DebugFrame is a modifier for SwiftUI view, which is very easy to use and add to any view you want. This modifier adds the overlay with stroke border and CGFrame parameters on your view.

License

Notifications You must be signed in to change notification settings

ZevEisenberg/DebugFrame

 
 

Repository files navigation

DebugFrame

DebugFrame lib - a simple and powerful tool that can help you build your SwiftUI views easily.

Under the hood it's a modifier that can be applied to any SwiftUI view. It adds an overlay to your view, which displays a border around the view, along with frame information, such as the view’s origin and size. This can be incredibly helpful when trying to identify layout issues, such as views that are too large or small or views that are positioned incorrectly.

Integration

Setup with SPM:

DebugFrame or https://github.com/vdshko/DebugFrame

Setup with CocoaPods:

pod 'DebugFrame'

Usage

VStack {
  title
    .debugFrame()
  Spacer()
  rectangles
    .debugFrame(color: .black)
  Spacer()
}
.debugFrame(color: .black, .size)

Screenshot 2023-04-06 at 03 06 00

About

DebugFrame is a modifier for SwiftUI view, which is very easy to use and add to any view you want. This modifier adds the overlay with stroke border and CGFrame parameters on your view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 83.2%
  • Ruby 12.1%
  • Objective-C 4.7%