Skip to content

deda9/SwiftFormatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

SwiftFormatter

Ruby scrip to format swift

run

ruby "dicrectory path which contain any swift file, coz it loops on each file and reformat it"

before formatting

import UIKit
import DependancyResolver
import GoogleSignIn

class LoginViewController: ChildModalViewController, UITextFieldDelegate, GIDSignInUIDelegate {
    
    // MARK: View model
    
    override var modalLayout: ModalLayout {
   
        if UIDevice.current.userInterfaceIdiom == .pad {
            
            return .bottomAnchoredOrCentered(CGSize(width: 700.0, height: 700.0))
        }
        else {
            
            return .centeredOrFullScreen
        }
    }
    
    private var loginViewModel: LoginViewModelProtocol?
    
    // MARK: UI properties
    
    @IBOutlet
    private var backgroundImageView: UIImageView?
    
    @IBOutlet
    private var backButton: UIButton?
    
    @IBOutlet
    private var navigationBarLabel: UILabel?
    
    @IBOutlet
    private var orLabel: UILabel?

after formatting

class LoginViewController: ChildModalViewController, UITextFieldDelegate, GIDSignInUIDelegate {

    // MARK: View model
    override var modalLayout: ModalLayout {
        if UIDevice.current.userInterfaceIdiom == .pad {
            return .bottomAnchoredOrCentered(CGSize(width: 700.0, height: 700.0))
        }
        else {
            return .centeredOrFullScreen
        }
    }
    private var loginViewModel: LoginViewModelProtocol?

    // MARK: UI properties
    @IBOutlet private var backgroundImageView: UIImageView?
    @IBOutlet private var backButton: UIButton?
    @IBOutlet private var navigationBarLabel: UILabel?
    @IBOutlet private var orLabel: UILabel?

About

Ruby scrip to format swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages