Swiftpack.co - Package - micheltlutz/MLBootstrap

404: Not Found

Github

link
Stars: 1

Dependencies

Used By

Total: 0

Releases

1.11.0 - 2020-01-05 12:02:27

MLTontiatorView

With color

 let viewActivitySmall = MLTontiatorView()
 viewActivitySmall.spinnerSize = .MLSpinnerSizeSmall
 viewActivitySmall.spinnerColor = UIColor.purple
 self.view.addSubview(viewActivitySmall)
 viewActivitySmall.startAnimating()

With image

 let viewActivitySmall = MLTontiatorView()
 viewActivitySmall.spinnerSize = .MLSpinnerSizeSmall
 viewActivitySmall.spinnerImage = UIImage(named: "mySpinnerImage")
 self.view.addSubview(viewActivitySmall)
 viewActivitySmall.startAnimating()

Result

        

1.10.0 - 2020-01-03 00:54:27


import UIKit
import MLBootstrap

class ProfilePhotoViewController: UIViewController {

    private var imagePicker: MLImagePicker?

    override func viewDidLoad() {
        super.viewDidLoad()

        self.imagePicker = MLImagePicker(presentationController: self, delegate: self)
        self.imagePicker?.present(from: self.view)
    }

}

extension ProfilePhotoViewController: MLImagePickerDelegate {
    func didSelect(image: UIImage?) {
        print("OK-ImagePickerDelegate")
    }
}

MLStackLabel issue public - 2019-11-14 04:44:09

Usage MLStackLabel

 private let titleLabel: MLStackLabel = {
        let titleLabel = MLStackLabel(text: i18n.General.event.text,
                                      padding: UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0))
        titleLabel.label.font = UIFont.boldSystemFont(ofSize: 16)
        titleLabel.label.textColor = MLColorPallet.AppColor.green.color
        titleLabel.label.textAlignment = .left
        titleLabel.label.backgroundColor = .green
        titleLabel.label.heightAnchor.constraint(equalToConstant: 40).isActive = true
        return titleLabel
    }()

MLStackLabel - 2019-11-14 04:27:04

Usage MLStackLabel

 private let titleLabel: MLStackLabel = {
        let titleLabel = MLStackLabel(text: i18n.General.event.text,
                                      padding: UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0))
        titleLabel.label.font = UIFont.boldSystemFont(ofSize: 16)
        titleLabel.label.textColor = MLColorPallet.AppColor.green.color
        titleLabel.label.textAlignment = .left
        titleLabel.label.backgroundColor = .green
        titleLabel.label.heightAnchor.constraint(equalToConstant: 40).isActive = true
        return titleLabel
    }()

Add Parameter toolBarTint - 2019-10-20 21:19:50

Add Parameter toolBarTint: UIColor an UIColor default UIColor.systemBlue

in MLDatePickerField and MLPickerField

New Formmaters and Extensions - 2019-10-20 16:11:07

Iso Date Formmat - 2019-10-17 02:15:53

New component MLQuestionCheck - 2019-10-01 00:18:03

MLQuestionCheck

You need two image files with named in your Assets

  • questionUnchecked
  • questionChecked
import MLQuestionCheck

let question1 = MLQuestionCheck(question: "You are ok?")
question1.didChangeState = { checked in
    print("question1 checked? \(checked)")
}

You can Change the image name

question1.uncheckedImageName = "new image name"
question1.checkedImageName = "new image name"
question1.setupCheck() // to change configuration buttons

Or Custom Font width and Runtime Change Text

let questionCheckCustom = MLQuestionCheck(question: "I'm iOS Developer?")
questionCheckCustom.widthQuestion = UIScreen.main.bounds.width
questionCheckCustom.font = UIFont.boldSystemFont(ofSize: 17)
questionCheckCustom.fontChecked = UIFont.boldSystemFont(ofSize: 20)
questionCheckCustom.didChangeState = { isChecked in
	print("questionCheck.isChecked: \(isChecked)")
}

Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { (_) in
	self.questionCheckCustom.question = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam."
}

New component MLPickerField - 2019-09-29 21:36:44

MLPickerField

                   
 private let genrePicker: MLPickerField = {
			let options = [(key: "female", value: "Female"), 
							  (key: "male", value: "Male")]

        let genrePicker = MLPickerField(placeHolder: i18n.RegisterFlow.genre.text, options: options)
        genrePicker.backgroundColor = .white
        genrePicker.textColor = MLColorPallet.darkGrey.color
        genrePicker.layer.borderWidth = 1.0
        genrePicker.layer.borderColor = MLColorPallet.orange.cgColor
        return genrePicker
    }()

MLDatePickerField - 2019-09-29 20:36:44


 private let fieldBirth: MLDatePickerField = {
        let fieldBirth = MLDatePickerField(placeHolder: "Your Brithday")
        fieldBirth.backgroundColor = .white
        fieldBirth.textColor = MLColorPallet.darkGrey.color
        fieldBirth.layer.borderWidth = 1.0
        fieldBirth.layer.borderColor = MLColorPallet.orange.cgColor
        return fieldBirth
    }()

String Utils - 2019-09-29 20:15:10

String Utils

  • dd/MM/YYYY to YYYY-MM-dd and YYYY-MM-dd to dd/MM/YYYY


//Params separator: Character = "/", newSeparator: Character = "-"
public var dateFormmater = "13/01/1988".dmyToymd() // Output: "1988-01-13"

//Params separator: Character = "-", newSeparator: Character = "/")
public var dateDbFormmater = "1988-01-13".ymdTodmy() // Output: "13/01/1988"

1.2.0 - 2019-09-29 00:33:37

New Formatters

1.1 - 2019-09-28 21:00:58

Remove MLFonts and file fonts

1.0.18 - 2019-09-28 20:43:25

1.0.17 - 2019-09-28 20:32:52

1.0.16 - 2019-09-27 22:52:45

1.0.15 - 2019-09-27 21:05:51

1.0.14 - 2019-09-27 18:02:29

1.0.12 - 2019-09-27 16:41:18

1.0.11 - 2019-09-27 16:27:23

1.0.10 - 2019-09-27 16:22:56

1.0.9 - 2019-09-27 15:04:46

1.0.8 - 2019-09-27 12:52:51

  • Xcode 11 Build - las Swift version support

Usage

MLLabel

//Default
MLLabel(text: String, fontSize: Int = 18)

// With NSMutableAttributedString
MLLabel(textLabel: NSMutableAttributedString,
		 color: String? = MLColorPallet.darkGrey.hex,
		 size: Int? = 14)
		 
// With NSMutableAttributedString
MLLabel(textLabel: NSMutableAttributedString,
		 color: String? = MLColorPallet.darkGrey.hex,
		 size: Int? = 14)
		 
// With NSAttributedString
MLLabel(textLabel: NSAttributedString,
		 color: String? = MLColorPallet.darkGrey.hex,
		 size: Int? = 14)
		 
// Paragraph with lineHeigt
mllabel.paragraphStyleWith(attributedString: NSMutableAttributedString, maximunLineHeight: CGFloat)

// Typing Animate
let mllabel = MLLabel(text: "", fontSize: 18)
mllabel.typingAnimate(text: "Hello, typeing message label", timer: 0.15) {

MLButton

let mlButton = MLButton(text: "Send")

MLSimpleButton

let mlSimpleButton = MLSimpleButton(text: "Forgot password?")

MLViewConfiguration - ViewConfiguration Helper


final class MyViewController: UIViewController {
	override viewDidLoad() {
		super.viewDidLoad()
		
		setupViewConfiguration()
	}

}


extension MyViewController: MLViewConfiguration {
	setupConstraints() {
	let defaultWidth = MLSizes.screenWidth() * 0.8
        NSLayoutConstraint.activate([
            fieldName.topAnchor.constraint(equalTo: view.topAnchor, constant: MLSizes.size(multiple: 3)),
            fieldName.widthAnchor.constraint(equalToConstant: defaultWidth),
            fieldName.centerXAnchor.constraint(equalTo: view.centerXAnchor)
            )]
	}
	
	buildViewHierarchy(){
       view.addSubview(fieldName)
	}
	
	func configureViews() {
        view.backgroundColor = .white
    }
}

1.0.7 - 2019-09-26 00:43:26

1.0.6 - 2019-09-26 00:23:25

1.0.5 - 2019-09-24 02:29:12

Fix Collor Pallet - 2019-08-31 03:07:32

1.0.3 - 2019-08-17 23:06:32

Add Component MLSimple Button

Stable Linter - 2019-08-10 18:00:59

Fix Public access MLLabel Animete func - 2019-08-10 14:45:45