I am trying to put a UITextView into a UITableViewCell because a UILabel won't hold the text the way I want it to. My code, below, is crashing the app every time...
I am trying to put a UITextView into a UITableViewCell because a UILabel won't hold the text the way I want it to. My code, below, is crashing the app every time...
This code for the cell itself is fine. You need to check the console to see that the real crashing reason is. Also add a breakpoint at OBJ_EXCEPTION_THROW to see where the exception occurs. I suspect that your stories array does not look like you assume in your code.
__________________
regards
Oliver Drobnik Cocoanetics - Our DNA is programmed in Objective-C.
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
This code for the cell itself is fine. You need to check the console to see that the real crashing reason is. Also add a breakpoint at OBJ_EXCEPTION_THROW to see where the exception occurs. I suspect that your stories array does not look like you assume in your code.
thanks so much for your reply. I should've included... my console error is
Code:
2010-02-28 12:37:43.253 bool _WebTryThreadLock(bool), 0x3ecf180: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
also, it seems like that error has something to do with the array... here's some other code in the cellForRowAtIndexPath method
thanks so much for your reply. I should've included... my console error is
Code:
2010-02-28 12:37:43.253 bool _WebTryThreadLock(bool), 0x3ecf180: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
that error has nothing to do with initialization of a table cell, (unless i'm way off). from the looks of this, you have something going in another thread that is the problem, and is manifesting itself around the time of your cell initialization.
but short of that, i would start carefully checking the contents of your array. i'm willing to bet as well that it doesn't hold what you think it does.