मैं निम्नलिखित कोड का उपयोग कर दो बटन के साथ एक चेतावनी दृश्य बनाया है:प्रतिनिधि विधि "clickedButtonAtIndex:" नहीं कहा जाता है
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle: title
message: msg delegate:nil cancelButtonTitle:@"Replay" otherButtonTitles:@"Highscore", nil];
[alertView show];
मैं जब बटनों में से एक क्लिक किया जाता है कुछ कोड चलाना चाहते हैं। ऐसा करने में, मैं delegate.m फ़ाइल में निम्न विधि जोड़ लिया है:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex==0) //Run some code
else //Other code
}
लेकिन इस विधि कहा जाता है नहीं है जब मैं बटन के दोनों प्रेस! क्या कोई मुझे बता सकता है क्यों?
अग्रिम धन्यवाद,
Sagiftw
सहायता के लिए धन्यवाद! मैं वह भूल गया!!! =) – Sagiftw
Thanx मैं भी भूल गया था। – iBapu