I'm new to IOS development and I have started with the swift language.
I'm trying to get the value from two text fields and convert those two text fields into json and send that json to the server receive.php.
lets concider that tow text fields are - name - pass
how do i create a Json & send that to server when a button is clicked ?
By using http POST method with NSURLSession. Let's say you are calling submitAction method on the press of the login button
Swift 3
Swift 3,Swift 4 The method above is very in-efficient, use alamofire instead
https://github.com/Alamofire/Alamofire
get email and passwoord from textfield
or here is an example