Why are you setting up the textView even when indexPath. Row is not zero (and you don't release if indexPath. Row is zero)?
Try moving the creation and setup to inside the "if (indePath. Row! = 0)" block (just above the addSubView line).
This I had previously tried, and something was still a little weird. A fix occured when I changed the if() to a switch/case function. – norskben Feb 22 '10 at 10:55.
Your problem may be that when you create the cells, you give them all the same cell identifier. When the first cell is queued, it does not have a text view, yet this part of your code is called: if (cell == nil) A cell is returned and isn't nil, but in the case of the first cell, it doesn't have a text view. Try changing the cell identifier for the first cell to see if you have better results; this will prevent it from being re-used.
– FelixLam Feb 22 '10 at 0:35 Your code creates a text view for each cell and hides it if the cell is at row 0. That results in an unnecessary text view being created. You suggest it, but then do the opposite.
– Jeff Kelley Feb 22 '10 at 1:39 I have update the code. – FelixLam Feb 22 '10 at 10:15 @Felix, your code looks good, but the comments still misinterpret what's going on. I suggest you read the Table View Programming Guide - your concept of creating one "master cell" is incorrect.
"cell == nil" will be true more than once per cell identifier. – Jeff Kelley Feb 22 '10 at 16:05 I did indeed misunderstand this, I checked it again. The documentation wasn't very clear here.
I will delete my post. – FelixLam Feb 22 '10 at 16:33.
I'm working in cellForRowAtIndexPath, and I'm trying to embed a textview into the cell. Now, the embedding part is all well and fine, but I am getting the strangest problem when I try and load the textview in all but the first row. Note: I want The TextView in all but the first row in my table.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.