मुझे इस तरह की समस्या है:अलर्ट व्यू को कस्टम दृश्य जोड़ने
मैं एक अलर्ट व्यू के अंदर एक अनुकूलित दृश्य दिखाना चाहता हूं। इसलिए मैं एक अलग xib फ़ाइल बनाता हूं और अपना इंटरफ़ेस डिज़ाइन करता हूं। और इसके लिए क्लास भी कार्यान्वित करता हूं। लेकिन जब मैं नीचे कोड लागू करता हूं, तो यह मुझे एक त्रुटि देता है।
इसकोड है:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Confirm your Action"
message:@"Click OK to confirm"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:@"Cancel",nil];
NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"customDialogViewController" owner:self options:nil];
customDialogViewController *myView = (customDialogViewController*) [subviewArray objectAtIndex:0];
[alert setValue:myView forKey:@"accessoryView"];
//alert.alertViewStyle = UIAlertViewStylePlainTextInput;
alert.tag = KAlertViewthree;
[alert show];
और यह मेरा त्रुटि है:
Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<ScheduleView: 0x8adf1a0> should have parent view controller:<_UIModalItemAccessoryViewControllerForLegacyAlert: 0xa888b70> but actual parent is:<UINavigationController: 0x8add8c0>'
मैं सच में आईओएस के लिए नए मैं इस गलत करते हैं development.did? गलती कहां है? मुझे नहीं पता कि यह निब फ़ाइल यहां क्या बात कर रही है "loadNibNamed: @bla boa" मैंने अभी इसके लिए अपना xib नाम दिया है। क्या कोई मुझे ऐसा करने का बेहतर तरीका दे सकता है या क्या आप मुझे बता सकते हैं कि मुझे इस मुद्दे को ठीक करने के लिए कहां बदलना है?
कृपया मुझे कुछ गाइड करें .. धन्यवाद।
, कल मैं पहले से ही आप मेरा उत्तर में बताया है कि इसके UIAlertView.In की नहीं एक समस्या अपने कंसोल लॉग ऑन इसकी स्पष्ट रूप से उल्लेख में अपने viewcontroller.So बदलने अपने प्रश्न इसकी नहीं एक कुछ मुद्दा है कि वहाँ UIAlertView की समस्या। – Jayaprada
महोदय, मैंने कल जो कहा है उसका पालन किया है। लेकिन काम नहीं किया। इसलिए मैं इस https://github.com/wimagguc/ios-custom-alertview का पालन करता हूं। किसी भी तरह से मैं अलर्ट कस्टम दृश्य में स्टार अंक जोड़ने में सक्षम हूं। लेकिन आप एक और टेक्स्ट फ़ील्ड और लाइबल्स नहीं जोड़ सकते हैं, क्या आप मुझे एक तरीका बता सकते हैं – Darshana
मैंने इसे github पर बनाया है। इसे डाउनलोड करें और मुझे UIAlertView पर अपनी समस्या के बारे में बताएं। https://github.com/jayaprada-behera/CustomAlertView। लेकिन ऊपर उल्लिखित मुद्दा UIAlertView – Jayaprada