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

How can APP accurately discover users’ real needs?

Regarding user needs, there is a very famous case...

How to enable Safe Browsing on Chrome for Android

The Chrome browser for Android has recently gaine...

9 to 5? The daily life of a CTO is not what you think

Every day of the year is an ordinary day, but eve...

How to make a good holiday marketing picture?

For holiday marketing pictures, it means: find th...

Users complain about iOS 9 bugs and lags

[[149781]] At the previous Apple press conference...

It turns out that the Double Eleven copywriting can be written like this

In addition to promotions, how else can you write...

User growth: How to establish a user perspective?

What is the user perspective? This is actually a ...

The correct way to use the prompt box in iOS9

[[154064]] In the process of upgrading from iOS8 ...

Four strategies for promoting Xiaohongshu!

Today, Xiaohongshu is increasingly becoming a bat...

Why does TCL want to compete for BlackBerry when it already has Aka and Palm?

With the pre-sale of the new Nokia 6 model, this ...

Sweaty herring, which one stinks more?

Text|Xu Rui (Copyrighted image from the gallery, ...