XCode Preview template for UIkit based project
SwiftPreview
XCode Preview template for UIkit based project.
Support custom file template class inherit from UIView and UIViewController.
How to use?
- Download Xcode Template & Install SwiftPreview
- Xcode > New File (Command + N)
You can choose Preview or PreviewController.
- Preview > (UIView, UITableViewCell, UICollectionViewCell, UICollectionReusableView)
- PreviewController > (UIViewController, UITableViewController, UICollectionViewController)
- Make file then preview will work.
Download Xcode Template
Auto Setup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/heoblitz/SwiftPreview/main/install.sh)"
Manual Setup
git clone https://github.com/heoblitz/SwiftPreview.git
cd SwiftPreview
mkdir -p ~/Library/Developer/Xcode/Templates/File\ Templates/SwiftPreview
cp -r Templates/. ~/Library/Developer/Xcode/Templates/File\ Templates/SwiftPreview
Installation
Swift Package Manager
Project > Project Dependencies > Add https://github.com/heoblitz/SwiftPreview
Cocoapods
pod 'SwiftPreview'
UnInstallation
- Remove dependency
- Delete template files
rm -r ~/Library/Developer/Xcode/Templates/File\ Templates/SwiftPreview
License
MIT