Code-based UI development with Canvas Preview
- Xcode 11
- macOS Catalina
- CocoaPods
- 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
- 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)
- For new UIView/UIViewController subclasses just add new class file from Xcode Template
- For exists UIView/UIViewController subclasses just use snippets with keywords: PreviewViewController, PreviewView, PreviewViewControllerCustom and PreviewViewCustom
- Enable Canvas (COMMAND+OPTION+ENTER) and Refresh (COMMAND+OPTION+P)
- Turn on 'Editor/Previews/Automatically Refresh Canvas'