Skip to content

heoblitz/SwiftPreview

Repository files navigation

SwiftPreview

XCode Preview template for UIkit based project.
Support custom file template class inherit from UIView and UIViewController.

How to use?

  1. Download Xcode Template & Install SwiftPreview
  2. Xcode > New File (Command + N)
    You can choose Preview or PreviewController.

  • Preview > (UIView, UITableViewCell, UICollectionViewCell, UICollectionReusableView)
  • PreviewController > (UIViewController, UITableViewController, UICollectionViewController)
  1. 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

  1. Remove dependency
  2. Delete template files
rm -r ~/Library/Developer/Xcode/Templates/File\ Templates/SwiftPreview

License

MIT

About

XCode Preview template for UIkit based project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published