मैं कोई नया दृश्य जब एक "अगला" बटन एक पिछले दृश्य से दबाया जाता है पर एक UIButton का पाठ सेट करने के लिए कोशिश कर रहा हूँ नहीं। मैं IBOutlet सही ढंग से स्थापित किया है और मैं इस के उत्तर के लिए सब कुछ खत्म देखा है, लेकिन यह सिर्फ सब पर काम नहीं कर रहा।UIButton setTitle forState कार्य
यहाँ मैं क्या कर रहा हूँ का एक नमूना है:
- (IBAction)computeQuiz:(id)sender
{
[fiveFootUniversalResults setTitle:@"Test" forState:UIControlStateNormal];
}
- (IBAction)jumpT10ResultsView:(id)sender
{
NSString *nibFileToLoad = @"JumpT10Results";
UIDevice *device = [UIDevice currentDevice];
if([device userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
nibFileToLoad = [nibFileToLoad stringByAppendingString:@"-iPad"];
}
JumpmasterPathfinderViewController *nextView = [[JumpmasterPathfinderViewController alloc] initWithNibName:nibFileToLoad bundle:nil];
// Modal view controller
nextView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:nextView animated:YES];
[nextView release];
[scrollView setContentSize:CGSizeMake(imageViewWidth, imageViewHeight + 44.0)];
}
इन कार्यों दोनों एक पिछले दृश्य पर एक बटन से जुड़े हैं। दृश्य ठीक और सबकुछ लोड करता है, केवल समस्या यह है कि टेक्स्ट बटन पर नहीं बदलेगा। मुझे 100% यकीन है कि मेरे पास आईबीओटलेट सही तरीके से सेट हैं, मुझे नहीं पता कि मैं क्या गलत कर रहा हूं। कोई विचार?
* मैं मैं IBOutlets सही ढंग से * निर्धारित किया है 100% यकीन है, मुझे आशा है कि IBActions सही ढंग से भी जुड़े हुए हैं? – beryllium
क्या आप वाकई सुनिश्चित करते हैं कि आपका कार्य सेट है? एक ब्रेक पॉइंट डालें और सत्यापित करें। – logancautrell
अगले दृश्य दिखाई देता है और मैं अपने computeQuiz कार्रवाई तब तक दिखाई देने में NSLogs रखा है। कार्यों को बुलाया जा रहा है। – Link