我有一个游戏,用户可以将分数提交到 Twitter。问题是,现在,他们可以输入任何他们想要的东西,而不是他们的实际分数。通过使 TextField 不可编辑,他们将无法更改分数。
有谁知道解决这个问题??
这是代码片段(显然也应用了 twitter 框架):
-(IBAction)twitter {
float currentTime = [seconds.text floatValue];
float newTime = currentTime;
NSString *twitter = [NSString stringWithFormat:@"I finished level 2 of #TextOff in %.2f seconds! Think you can beat my score? Download it in the App Store now!", newTime];
TWTweetComposeViewController *tweet = [[TWTweetComposeViewController alloc] init];
[tweet setInitialText:twitter];
//am i able to get ride of the textfield here?????
[self presentModalViewController:tweet animated:YES];
}