Monday, 15 August 2011

ios - UITableViewCell not showing subview UITextView -


I combed through dozens of answers to other sites in question / stack overflow and about this, but I can not It works like this quite normal problem, but none of the other questions I have answered have not answered. Actually, I'm trying to add a simple cell to a normal cell, and it's not showing up. Here have I:

  - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath {UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: @ "cell"] ; UITextView * textviewFactoid = Zero; If (cell == null) {cell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: @ "cell"]; Tekstviufaktoid = [[Uitekstviav light] Initvitःfrme: Kgrektmke (0, 3, 300, 25)]; [TextviewFactoid Set Font: [UIFont systemFontOfSize: 12.0f]]; [TextviewFactoid setBackgroundColor: [UIColor blueColor]]; [TextviewFactoid setTextColor: [UIColor grayColor]]; [TextviewFactoid Set ScrollEnabled: NO]; [TextviewFactoid Set Editable: No]; [TextviewFactoid Settag: 98]; [[Cell ContentView] Adsview: TextUfactioid]; } Other {textviewFactoid = (UITextView *) [cell.contentViewViewTag: 98]; } NSString * textviewFactoidText = @ "here is the fact"; [TextviewFactoid Set Text: textviewFactoidText]; Return cell; }   

Does anyone know why the cell will be empty? I have set the background color to blue, so I came to know whether text is present on the preview, and it does not seem so. I'm not getting any errors or warnings, either, to help me determine exactly what's wrong.

I have copied another app I almost literally wrote the code, and it works fine there ... I'm missing 'sure it's something simple I or I'm changing, but I'm stumped in a way.

What do I have to do with a sharp eye?

If you are building for iOS 6 and a nib or class for your cell identifier dequeueReusableCellWithIdentifier A cell will always return. If your if (cell == zero) { will never evaluate as accurately and will run the code within that block.

No comments:

Post a Comment