Created
November 2, 2011 06:07
-
-
Save alexyork/1333011 to your computer and use it in GitHub Desktop.
MonoTouch Twitter Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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