ios - get crashed when deference subclassed NSObject -


  @interface पादस्कर: NSObject @property (nonatomic, असाइन) अहस्ताक्षरित int dw3C; @ प्रॉपर्टी (नॉनैटोमिक, असाइन) BOOL हैसेट; @ प्रॉपर्टी (नॉनैटोमिक, असाइन करें) पीएसीसीएक्टैक्स मॉडेल मॉडल; @end  

दूसरे वीसी में

  @property (nonatomic, मजबूत) NSMutableDictionary * shakeDict;  

फिर मैं हिला करने के लिए कुछ ऑब्जेक्ट्स डालता हूं

  - (शून्य) दृश्यडिडलोड {एनएसएनumber * num = [एनएसएन नंबर संख्या के साथएनआईएनएसआईएनआईटी: message.sDeviceInfo.dw3CId]; पाडियाकर * खोज = [[पैडिसकर एलोक] इनिट]; Discover.dw3C = message.sDeviceInfo.dw3CId; Discover.model = message.sDeviceInfo.dwDeviceType; Discover.isSet = message.sDeviceInfo.fgPasswdFlag; [_shakeDict सेट ऑब्जेक्ट: के लिए खोज की: [NSString stringWithFormat: @ "% @", संख्या]]; [_shakeTV पुनः लोडडेटा]; } - (UITableViewCell *) तालिकादृश्य: (UITableView *) तालिका दृश्य सेलफोराअटइंडपैथ: (NSIndexPath *) सूचकांकपथ {स्थिर NSString * CellIdentifier = @ "सेल"; UITableViewCell * सेल = [तालिकादृश्य] dequeueReusableCellWithIdentifier: CellIdentifier]; अगर (सेल == नीला) {सेल = [[यूआईटीबल दृश्यकेल alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: CellIdentifier]; } पादक्कर * खोज = [[_shakeDict allKeys] objectAtIndex: indexPath.row]; ** cell.textLabel.text = [NSString stringWithFormat: @ "ID% u, ISSet% d", discover.dw3C, discover.isSet]; // क्रैश हो गया! ** cell.detailTextLabel.text = [NSString stringWithFormat: @ " मॉडल% d ", discover.model]; Cell.detailTextLabel.font = [UIFont boldSystemFontOfSize: 11]; रिटर्न सेल; }  

ऐसा लगता है कि सफलतापूर्वक पैडीसवर का सम्मान नहीं किया जा सकता है, लेकिन मुझे यकीन नहीं है कि मुझे कब गलत मिले। क्या कोई मेरे लिए यह समझा सकता है?

इसे आज़माएं,

  NSString * कुंजी = [[_shakeDict allKeys] objectAtIndex: indexPath.row]; पैडिसवर * खोज = [_shakeDict ऑब्जेक्टफोरकी: कुंजी];  

के बजाय

  पादिसक्वेर * खोज = (पादिकासक्वेर् *) [[शमकॉक्ट ऑलकेज़] ऑब्जेक्टअटइंडएक्स: इंडेक्सपाथ.रो];  

Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -