Skip to content

Instantly share code, notes, and snippets.

View waseem-pk's full-sized avatar
😎

M Waseem Abbas waseem-pk

😎
View GitHub Profile
@waseem-pk
waseem-pk / Dictionary in parameter using Alamofire,Swift
Created November 25, 2021 15:06
To use Dictionary in the parameter for Alamofire Request, Swift iOS
//First to decalre Parameter
var array = [[String : Any]]()
//MARK:- to call Api
func postRequest_toServer(){
let apiURL = AppConfig.shared.apiBasicURl + "user/post-new-job"
let objPostNewJob = PostNewJob()
@waseem-pk
waseem-pk / Date Extension Swift
Created November 23, 2021 10:35
Date Extension for Swift iOS
//MARK:- DATE
extension Date {
func toSString_ServerFormat() -> String {
let dateFormatter = DateFormatter()
dateFormatter.timeZone = .current
dateFormatter.dateFormat = "yyyy-MM-dd hh:mm:ss"
@waseem-pk
waseem-pk / Alert Extension
Created November 23, 2021 10:21
Alert Extension for SwiftUi, iOS
public struct TextAlert {
public var title: String
public var placeholder: String = ""
public var accept: String = "OK"
public var cancel: String = "Cancel"
public var action: (String?) -> ()
}
extension View {