Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, what I'm thinking is, The titles, <strong>Events</strong>, <strong>Overhead</strong> and <strong>Friends</strong> would be the custom <code>UIView</code> with <code>UIImageView</code> for background, <code>UILabel</code> for title, and <code>UIButton</code> for expand. So basically </p> <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView </code></pre> <p>having return count of the titles you've.</p> <pre><code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section </code></pre> <p>having return <code>UIView</code> for each titles.</p> <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section </code></pre> <p>having count of the rows within that title. <strong>You may need to maintain an array for this.</strong></p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; </code></pre> <p>having height of the cell item</p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section </code></pre> <p>initially it should be 0 (zero) for all sections, when user tap on expand, it should be increase with respect to <strong>number of rows * cell height</strong> within that section.</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath </code></pre> <p>You may need some good logic for setting all rows for expansion</p> <p>Your expansion buttons actions something like,</p> <pre><code>- (void) expandSection:(UIButton *)sender; </code></pre> <p>that you can identify which section to be expand using sender.tag, so don't forget to add tag properly. You may need an <code>int</code> in <code>.h</code> file for store the current section, and can be use in <code>- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section</code> datasource method.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload