Giter Site home page Giter Site logo

funzin / viewgenerator Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 8.0 7 MB

⚒ ViewGenerator generates view code from variable name automatically in iOS development

License: MIT License

Swift 93.26% Ruby 1.30% Objective-C 2.34% Shell 3.10%
swift ios mac macapp xcode xcode-source-editor-extension uiview xcode10 xcode-extension xcode-plugin

viewgenerator's Introduction

ViewGenerator

Platform Language License License

Overview

ViewGenerator generates view code from variable name automatically when you create view by code in iOS development

Download

Environment

  • Xcode 10.3 or greater
  • Swift 5.0 or greator

Demo

Install

  1. Install ViewGenerator from AppStore

  2. Enable ViewGenerator

    1. System PreferencesExtensions
    2. Switch on Xcode Source Editor checkbox

Usage

  1. Input variable name
    ⚠Important⚠ : variable name must be included class name without UI as suffix. (e.g. hogeView, hogeLabel, etc.)
    Please check Support View List bellow
  2. Select variable name
  3. EditorViewGeneratorGenerate View Code

  1. Generated⚒

Recommend

I strongly recommend that you register Generate View Code Command to shortcut

  1. Xcode Preferences → KeyBindings
  2. Input ViewGenerator in Search
  3. Register shortcut

Usage Example

Multiple variables

GIF
select

Single Variable

GIF
not_select
select

Supplement

Default access modifier is private . if you change access modifier, open viewgenerator app and then select access modifier that you want to select

Example

For example, if variable name prefix is hoge, it is generated as bellow

hogeView

private let hogeView: UIView = {
    let hogeView = UIView(frame: .zero)
    hogeView.translatesAutoresizingMaskIntoConstraints = false
    return hogeView
}()

hogeButton

private let hogeButton: UIButton = {
    let hogeButton = UIButton(frame: .zero)
    hogeButton.translatesAutoresizingMaskIntoConstraints = false
    return hogeButton
}()
hogeTableView
private let hogeTableView: UITableView = {
    let hogeTableView = UITableView(frame: .zero)
    hogeTableView.translatesAutoresizingMaskIntoConstraints = false
    return hogeTableView
}()
hogehoge
private let hogehoge: _InputTypeName_ = {
    let hogehoge = _InputTypeName_(frame: .zero)
    hogehoge.translatesAutoresizingMaskIntoConstraints = false
    return hogehoge
}()

Support View List

View
UISwitch
UIActivityIndicatorView
UIButton
UICollectionView
UIControl
UIDatePicker
UIImageView
UILabel
UINavigationBar
UIPageControl
UIPickerView
UIProgressView
UIScrollView
UISearchBar
UISegmentedControl
UISlider
UIStackView
UIStepper
UITabBar
UITableView
UITextField
UITextView
UIToolbar
UIView
UIVisualEffectView

If you input variable name that doesn't correspond to the support view list, type name is input as _InputTypeName_ automatically.

Contact

If you discover problem or have opinions, please let me know through Github issues💁‍♂️

Author

funzin

License

ViewGenerator is available under the MIT license. See the LICENSE file for more info.

viewgenerator's People

Contributors

funzin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

viewgenerator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.