Skip to content

ILYA2606/UIPreview

Repository files navigation

CocoaPods SPM

PreviewUIKit

Code-based UI development with Canvas Preview

Requirements:

  • Xcode 11
  • macOS Catalina
  • CocoaPods

Screenshot

Features:

  • UI with Canvas Preview (SwiftUI-like)
  • No more Storyboard and XIB
  • UIKit fast debugging
  • Supports iOS 9+ projects
  • Xcode templates and snippets
  • Ability preview with custom initialize
  • Compactible with SnapKit and others code-based UI development

Demo Demo Demo

Installation

  • Add PreviewUIKit in your iOS Project with CocoaPods:
pod 'PreviewUIKit', '~> 1.0.0'
  • Install Xcode templates: Contents of XcodeTemplates folder copy to ~/Library/Developer/Xcode/Templates/File Templates/User Templates (Create this folders if needed)
  • Install Xcode snippets: Contents of XcodeSnippets folder copy to ~/Library/Developer/Xcode/UserData/CodeSnippets (Create this folders if needed)

How to use:

  • For new UIView/UIViewController subclasses just add new class file from Xcode Template
    Screenshot
  • For exists UIView/UIViewController subclasses just use snippets with keywords: PreviewViewController, PreviewView, PreviewViewControllerCustom and PreviewViewCustom Screenshot Screenshot
  • Enable Canvas (COMMAND+OPTION+ENTER) and Refresh (COMMAND+OPTION+P)
  • Turn on 'Editor/Previews/Automatically Refresh Canvas'

About

Code-based UI development with Canvas Preview

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published