I review your code. You reset your timer first, then you are send score to share on Twitter
.
First share on Twitter
and then you have to call setupGame
method like this :
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 1)
{
[self postToFacebook];
}
else if (buttonIndex == 2)
{
[self postToTwitter];
}
[self setupGame]; // after share you can reset
}
And call this method like -(void)postToTwitter
not like - (IBAction)postToTwitter
. because there is no connection to that method. you are calling that method not connect with a button action.