Posts

Showing posts with the label new App

Important extensions while create a new App in swift

protocol Supporter {     var isEmptyValue : Bool { get }     var isNotEmptyValue : Bool { get } } protocol DecimalSupporter {     var isNegative : Bool { get }     var isPositive : Bool { get } } protocol DoubleSupporter {     var toDouble : Double { get } } protocol FloatSupporter {     var toFloat : Float { get } } protocol IntSupporter {     var toInt : Int { get } } protocol StringSupporter {     var toString : String { get } } protocol DateSupporter {     var toDate : Date ? { get } } protocol DateWithFormateSupporter {     func toDate ( _ formate: String )-> Date ? } extension String : Supporter , DoubleSupporter , FloatSupporter , IntSupporter , DateSupporter , DateWithFormateSupporter {          var toDate : Date ? {         let dateFormatter = DateFormatter ()         return dateFormatter. date ( from : self )     }          func toDate ( _ formate: String ) -> Date ? {         let dateFormatter = DateFormatter ()