1, SB Add a TV, arrow, Cell, create TVC and associate
2, establish student object, in. The string name is established in H, and the number of words is English;
3. Create an array in TVC, the object of the student, initialize,
Get string and content (TXT file)
Split string
Traverse to get each line, get each row and then split
Each line is to create a student,
The number of each student's name language score
Add the created student object to the array
4, line number, content,
Remove each line of student object,
Then Cell,textlabel.text =.
The name is now displayed.
5. Create Tableviewcell
Name of the cell in the associated SB
Drag the label to the interface to change each color
6, connect to STUNDENTVC. H is related to this
Return to tic-associated cell, then delete Textlabel in the display content method (because the code takes precedence, will cover SB)
And then set the display of each label, at this point will be displayed at this time to cut the display content of four, to cell,h in the Layoutsubviews method, (this method will be called before each display)
In the method again, add "Super layoutsubviews" (translate the original things to be added)
Paste four contents, change the cell to self, and then student. The student attribute is declared in H, which is then passed to the cell inside the--cell in TVC. s = s;
equivalent = self.student "index path. Row ",
And then back to the cell. H can be written in =self ...
———— was created by SB.
IOS Custom Cell Transcripts--learning notes in Lan Yi education