Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Someone help me understand async

$
0
0

HI am trying to call a method from a button produced by ios designer but for some reason the compliler complains

    async public  void Createuser ()
    {



        var user = new ParseUser ()
        {
            Username = txtUserName.Text,
            Password = txtPassword.Text,
            Email = txtEmail.Text
        };


        await user.SignUpAsync ();
    }


      partial void btnSave_TouchUpInside (UIButton sender)
    {

        Createuser();


    }

How do i call my method from a btn click when the designer as created the action in behind has follows

[Action ("btnSave_TouchUpInside:")] [GeneratedCode ("iOS Designer", "1.0")] partial void btnSave_TouchUpInside (UIButton sender);

And how do i stop the ios designer from changing what I hardcode in the designer as I persume the designer.cs needs to be changed to allow me to call the async method?

Thanks in Advance David


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>