XCode Preview template for UIkit based project.
Support custom file template class inherit from UIView and UIViewController.
- 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.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/heoblitz/SwiftPreview/main/install.sh)"
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
Project > Project Dependencies > Add https://github.com/heoblitz/SwiftPreview
pod 'SwiftPreview'
- Remove dependency
- Delete template files
rm -r ~/Library/Developer/Xcode/Templates/File\ Templates/SwiftPreview
MIT