Skip to content

Instantly share code, notes, and snippets.

@alexyork
Created November 2, 2011 06:07
Show Gist options
  • Save alexyork/1333011 to your computer and use it in GitHub Desktop.
Save alexyork/1333011 to your computer and use it in GitHub Desktop.
MonoTouch Twitter Bug
// Error:
// Wrapper type 'MonoTouch.Twitter.TWTweetComposeViewController' is missing its native ObjectiveC class 'TWTweetComposeViewController'. Please check if it's been linked.
// Other Info:
// - I am targetting v 5.0
// - I have tried switching linking on and off, to no avail
// - I have the latest MonoTouch installed
// My code:
public partial class MyViewController : UIViewController
{
private TWTweetComposeViewController tweetSheet;
public override void ViewDidLoad()
{
var shareButton = new UIBarButtonItem(UIBarButtonSystemItem.Reply);
shareButton.Clicked += (sender, e) => {
tweetSheet = new TWTweetComposeViewController();
tweetSheet.SetInitialText("My tweet!");
PresentModalViewController(tweetSheet, true);
};
NavigationItem.RightBarButtonItem = shareButton;
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment