iOS source code download: stacked cells in groups

iOS source code download: stacked cells in groups

Supported platforms: iOS

Operating environment: iOS

Development language: Object-C

Development tools: Xcode

Source code size: 60.27KB

Source code download address: http://down..com/data/1975620

Source code introduction

The third-party library TFStackingSectionsTableView can stack cells in groups. The group header is displayed on the table, and clicking the group header can expand the corresponding cell.

Source code running screenshot

Rendering

Source code snippet

  1. - ( void )viewDidLoad
  2. {
  3. [super viewDidLoad];
  4.       
  5. self.groups = @[@ "Group A" , @ "Group B" , @ "Group C" , @ "Group D" , @ "Group E" , @ "Group F" , @ "Group G" , @ "Group H" ];
  6. self.members = @[
  7. @[@ "Brazil" , @ "Mexico" , @ "Croatia" , @ "Cameroon" ],
  8. @[@ "Netherlands" , @ "Chile" , @ "Spain" , @ "Australia" ],
  9. @[@ "Columbia" , @ "Greece" , @ "Côte D'Ivoire" , @ "Japan" ],
  10. @[@ "Costa Rica" , @ "Uraguay" , @ "Italy" , @ "England" ],
  11. @[@ "France" , @ "Switzerland" , @ "Ecuador" , @ "Honduras" ],
  12. @[@ "Argentina" , @ "Nigeria" , @ "Bosnia and Herzegovina" , @ "Iran" ],
  13. @[@ "Germany" , @ "USA" , @ "Portugal" , @ "Ghana" ],
  14. @[@ "Belgium" , @ "Algeria" , @ "Russia" , @ "Korea Republic" ]
  15. ];
  16. }
  17. - (UIView *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
  18. return self.groups[section];
  19. }
  20.   
  21. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
  22. {
  23. return nil;
  24. UILabel *label = [UILabel new ];
  25. label.text = [@ " " stringByAppendingString:self.groups[section]];
  26. label.backgroundColor = [UIColor colorWithWhite:0.97f alpha:1.0];
  27. label.textColor = [UIColor colorWithWhite:0.13f alpha:1.0];
  28. label.font = [UIFont boldSystemFontOfSize:14.0f];
  29. return label;
  30. }

Source code download address: http://down..com/data/1975620

<<:  Android decompilation: decompilation tools and methods

>>:  iOS source code download: Implementing custom drawing functions

Recommend

An article to show you 20 new changes in iOS 12 Beta 5

A few days ago, Apple released the iOS 12 beta 5 ...

What does PUA man mean? What does PuA mean for a man?

Now, pua boy is a very popular term, which mainly...

Is food inedible after it sprouts? This is not necessarily true!

When we see food starting to sprout, our first re...

20 brands tell you the triple realm of brand content marketing in 2016!

Today's society has entered a stage of consum...

Tips on how to choose a 400 number when applying for one

Now there are many companies that need to apply f...

How to develop a complete user growth system architecture?

If you learn the right principles in the field of...