हाय प्रोग्रामिंग के लिए शुरुआत करने वाला है और उम्र के लिए इस कार्य पर फंस गया है और कहीं भी नहीं मिल रहा है।टेक्स्टफ़ील्ड खाली होने पर अक्षम बटन
मूल रूप से मेरे पास कई टेक्स्टफील्ड हैं जो उपयोगकर्ता को एक बटन दबाते समय एक अलग पृष्ठ पर इनपुट जानकारी उत्पन्न करता है। मैं बटन को तब तक अक्षम करना चाहता हूं जब तक कि सभी टेक्स्ट फ़ील्ड जानकारी से भरे न हों।
अब तक मैं इस है:
- (void)textFieldDidEndEditing:(UITextField *)textField
{
// make sure all fields are have something in them
if ((textfbookauthor.text.length > 0)&& (textfbookedition.text.length > 0)&& (textfbookplace.text.length > 0)&& (textfbookpublisher.text.length > 0) && (textfbookpublisher.text.length > 0) && (textfbooktitle.text.length > 0) && (textfbookyear.text.length > 0)) {
self.submitButton.enabled = YES;
}
else {
self.submitButton.enabled = NO;
}
}
समस्या है 'submitButton', क्या उसके स्थान पर जाने की जरूरत है एक त्रुटि के साथ आ रहा है? मैंने इसके बजाय बटन 'बुकबटन' डालने की कोशिश की लेकिन यह काम नहीं कर रहा है।
इस बटन
-(IBAction)bookbutton:(id)sender;
{
NSString* combinedString = [NSString stringWithFormat:
@"%@ %@ %@.%@.%@:%@.",
textfbookauthor.text,
textfbookyear.text,
textfbooktitle.text,
textfbookedition.text,
textfbookplace.text,
textfbookpublisher.text];
BookGenerate*bookg = [[BookGenerate alloc] init];
bookg.message = combinedString;
bookg.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:bookg animated:YES];
[BookGenerate release];
}
'उत्पन्न' के लिए किसी को भी जानता है अगर मैं यह कैसे काम या क्या मैं जोड़ने के लिए कृपया मदद की जरूरत कर सकते हैं मेरे कार्य है।
धन्यवाद अग्रिम
मुझे यह उपलब्ध कराने के लिए बहुत बहुत धन्यवाद, मैं अब इसे आजमाऊंगा – Ayub
अच्छा! इस उत्तर के लिए धन्यवाद। UITextView का उपयोग करते समय [यह] (http://stackoverflow.com/a/35674334/3411787) आज़माएं। –