Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var button2 = UIButton.FromType (UIButtonType.RoundedRect);
- button2.Frame = new RectangleF (0f, 0f, 300f, 40f);
- button2.SetTitle ("Tweet!", UIControlState.Normal);
- button2.TouchUpInside += (sender, e) => {
- var tvc = new TWTweetComposeViewController ();
- tvc.SetInitialText ("Here is a tweet...");
- tvc.SetCompletionHandler ((result) => {
- if (result == TWTweetComposeViewControllerResult.Cancelled) {
- Console.WriteLine ("Cancelled sending the tweet!");
- } else {
- Console.WriteLine ("Tweet sent! hurrah!");
- }
- this.DismissModalViewControllerAnimated (true);
- });
- this.PresentModalViewController (tvc, true);
- };
- View.AddSubview (button2);
Add Comment
Please, Sign In to add comment