Questions tagged [uitableviewsectionheader]

218 questions
0
votes
1 answer

Change sections title color in didSelectRow

After tapping on cell in particular section I want to change text color for title label in custom headerView. func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { switch…
Milos Mandic
  • 1,046
  • 2
  • 13
  • 19
0
votes
1 answer

How to add corner radius and a background to a whole section including its header and cells in UI Table View

How do I add corner radius and background to both the section header and its cell together like in the iOS weather app? My table view data source and delegate- extension HomeViewController: UITableViewDataSource, UITableViewDelegate { func…
0
votes
1 answer

How to dynamically change UITableView section header with scrolling. Or how to add a button to table section header?

The default behavior for UITableView section headers is to stick to the top edge of the table and slightly change background to a thin material. I need to add a button to the section header, so, as I understand, I need to write my own custom…
Grant Oganyan
  • 352
  • 1
  • 11
0
votes
1 answer

How to set Section Border In tableview With Expanding and Collapsing?

I'm Creating an design. In this Design I have to set Border colour for Section with collapsing and Expanding. I created a Xib file for Custom section but it's only show border colour in section . I want the Colour for whole section. No matter how…
iFateh
  • 570
  • 2
  • 6
  • 22
0
votes
3 answers

Header Cell of UITableView in Swift

I am using a UITableView with the header. For the header I use viewForHeaderInSection. I have a label and a button in my header cell. I also have an array to give my headerViewCell's label a name. My array is let cellArray = ["Cat", "Dog", "Mouse",…
0
votes
1 answer

Separator insets for table section header

I have an UITableView (style = UITableView.Style.plain) with rather simple cells. In IB I set cell's separator inset as custom: Also, I set table section header as follows: func tableView(_ tableView: UITableView, viewForHeaderInSection section:…
Nick
  • 3,205
  • 9
  • 57
  • 108
0
votes
2 answers

Conditionally hide a section header of a grouped tableview with each section having title

I have a condition based on which, I need to hide the header for my static tableView. My tableview's style is grouped and every section has a title in the section Header. I am setting the height of the 5th section to CGFloat.leastNormalMagnitude…
Natasha
  • 6,651
  • 3
  • 36
  • 58
0
votes
1 answer

Gap created UITableView where no section header or footer should be shown

I have a gap that is created between two sections and I don't know how to get rid of it. I have 4 sections: Section 1(Lifelist), 2(Dawn chorus), and 3(Search) 4(Birds) Section 1, 2, and 3 all have (same type) headers, but section 4 doesn't.…
Stephan
  • 881
  • 9
  • 24
0
votes
0 answers

iOS15 UITableView section header clear background loses transparency when header is pinned

I had pinned section headers with a clear background working in iOS14 using UIBackgroundConfiguration and the following code: if #available(iOS 14.0, *) { var backgroundConfiguration = UIBackgroundConfiguration.listPlainHeaderFooter() …
Brian M
  • 3,812
  • 2
  • 11
  • 31
0
votes
0 answers

Is it possible in Swift to hide UITableView header when scrolling down, and show it again when scrolling up programmatically?

I'm wonder how to make it right programmatically, if you know, please, share with me. Now my code looks like this: let tbv = SearchTableView(frame: .zero, style: .grouped) tbv.register(SearchTableCell.self, forCellReuseIdentifier:…
0
votes
1 answer

iOS - perform animation on tableView reload

I have to perform some animation effect on tableView - section and rows while displaying for the first time. The animation behaviour is illustrated below On taking a deeper look, the sectionView slides in from left to right (dark grey). On…
iOS
  • 3,526
  • 3
  • 37
  • 82
0
votes
0 answers

UITableView - smooth expand and collapse showing a UICollectionView

I am working on a feature in an app where the user can tap on some attribute about a car (such as its color) and a list of different colors will be shown. This is just part of the page. The whole page consists of different views and view controllers…
0
votes
2 answers

How to group friends by the first letter of the last name in UItableView into sections

I have friend struct model. struct Friend { let name: String let photoImageName: String } And my FriendsViewController with tableview outlet final class FriendsViewController: UIViewController { // MARK: - IBOutlet @IBOutlet var…
protodimbo
  • 35
  • 1
  • 8
0
votes
2 answers

how to add header view to each of custom tableViewCells in swift

I have two custom TableViewCells. So first TableViewCell is like a recent list, it can become longer. but second cell is always stays at bottom. so i need to add UILabel that hold's secondTableViewCell. the result that i need. import UIKit class…
0
votes
1 answer

Unable to Format the Section Header of UITableView

One View Controller which has three Table Views in it. I am struggling with formatting and setting the section header for each table.My func for viewForHeaderInSection is attached below My Goal is to achieve something like the image. Struggling to…