SLUtility 0.1.4

SLUtility 0.1.4

Maintained by ankit solulab.



SLUtility 0.1.4

  • By
  • ankitsolulab

SLUtility

CI Status Version License Platform

Requirements

  • iOS 8.0 or later
  • Xcode 9.0 or later

Installation

SLUtility is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SLUtility'

Feature

  1. String Extension.
  2. Date Extension.
  3. UIButton Class with UIImagePickerController

CODE

SLString.swift - provided methods

- func removeWhiteSpaceAndNewLine()
- func validateStringToURL()
- func isValidEmail()

SLDateTimeAgo.swift

  • This class will provide you date diffrence from any date to current date by x.. seconds, min, hours, days, months, years ago...

SLImagePickerButton.swift

  • This class provide you image from UIImagePickerViewController .

Example - SLImagePickerButton

self.buttonImagePicker.pickImageFromPicker(isAllowEditingImage: true) { (imagePickerInfo) in

    guard let info = imagePickerInfo else {
        // Cancel image picker
        return
    }

    // Image selected successfully from image picker.
    if let image = info[self.buttonImagePicker.imagePicker.allowsEditing ? UIImagePickerController.InfoKey.editedImage : UIImagePickerController.InfoKey.originalImage] as? UIImage {
        self.buttonImagePicker.setBackgroundImage(image, for: .normal)
    }
}

Author

ankitsolulab, [email protected]

License

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