Questions tagged [uitableviewsectionheader]

218 questions
2
votes
1 answer

Sorting UITableViewData from AlamoFire with an escaping closure

I'm trying to sort and section a UTableView with a Custom Cell Alphabetically. In my ViewController I have a function that downloads the JSON data then stores it in a Dictionary. var attendees = [Attendee]() var sortedFirstLetters: [String] =…
user1938745
  • 193
  • 2
  • 5
  • 16
2
votes
1 answer

Manage automatic header height with dynamic label width in UITableView

I want to create a UITableView header with dynamic height. I have four labels in the view and the height of the header must be adjusted according to the content in each of the UILabels. I want to achieve something similar to this image. Sample…
2
votes
1 answer

Overriding drawRect(_:) in UITableViewHeaderFooterView results in black background

1. Empty custom view implementation I created an empty subclass of UITableViewHeaderFooterView as follows: class MyCustomHeaderView: UITableViewHeaderFooterView { } I registered that class with my table…
Mischa
  • 15,816
  • 8
  • 59
  • 117
2
votes
1 answer

iOS swift tableView header with JSON array

I have a UITableViewlike this: and a tableView data fetch from JSON with Alamofire and SwiftyJson: JSON Data: { "timeline": { "Milan": { "place": [ { "name": "Place 1", "kind": "historic", }, { "name": "Place 2", …
Mohammadreza
  • 225
  • 5
  • 19
2
votes
1 answer

On swipe to delete, the header and footer section of the TableView swipe too

I have a problem with my TableView. After adding a section footer, I realized that it moves when I swipe-to-delete. I have created a minimal project with just this function to show the problem I face. This is the result I get I have two…
FredericP
  • 1,119
  • 1
  • 14
  • 27
2
votes
1 answer

Stretchy Header for a programmatically created UITAbleView - Swift

I have created UITableView programmatically. I'm not using storyboards. I read and watched tons of tutorials on how to create a stretchy header but all of them use Storyboards. As I understood, to achieve stretchy effect you have to add…
mrGott
  • 1,066
  • 3
  • 18
  • 53
2
votes
3 answers

Swift 2.2 UITableViewHeaderFooterView transparent

I'm trying to set a transparent background to a TableViewHeader but without success. First of all, would like to know if it's possible? This is what I've done func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection…
Stan92
  • 453
  • 1
  • 8
  • 21
2
votes
5 answers

Custom view is not fit to header in UItableview

Hi i have tried to set custom view on tableview header but custom view is not fit to header. Custom view is coming like below image,in this image custom view is orange color and header view is gray color.But i want fit custom view is full of header…
user5102362
2
votes
3 answers

UITableView HeaderView margin when removing separator's left space

I've removed the separator left margin from my tableview using in the viewDidLoad: self.tableView.layoutMargins = UIEdgeInsetsZero self.tableView.separatorInset = UIEdgeInsetsZero In my cellForRowAtIndexPath: cell.layoutMargins =…
Fran Fox
  • 501
  • 5
  • 15
2
votes
1 answer

Adding a date as a section header in a tableView

I have a tableView that has data organised by date added, from the latest to the oldest. I want to add a section header that separates/organises each of these cells by date. I have attached a picture of how Fitbit has their section headers. They do…
Gugulethu
  • 1,426
  • 3
  • 18
  • 36
2
votes
4 answers

UISegmentedControl behaves in a weird way on UITableView Header

I created a Custom Cell to replace UITableViewSectionHeader with a protocol to process when UISegmentedControl.index is changed so i can order the table by name or value: import UIKit protocol OrdenarTableViewDelegate { func ordenarTableView(cell:…
2
votes
1 answer

Variable height child view controller as UITableView's tableHeaderView

I am trying to create a UITableViewController which has a UICollectionViewController as its tableHeaderView. This collection view will vary in height depending on what's (re)loaded. Here is the basic layout. And here it is in action: As of now, I…
VaporwareWolf
  • 10,143
  • 10
  • 54
  • 80
2
votes
2 answers

NSMutableArray sorting and displaying in UITableView

I need to show a grouped tableview from the below data. I need to categorise the below array based on "account_type". For Eg: I need to show Table Section Heading "Savings" and list all savings type accounts, then similarly get Unique account types…
2
votes
1 answer

UITableView Section above UISearchBar

I have added an UISearchBar to my UITableView. // Search Bar var leftPosSearchBar: CGFloat = 0 if (UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Phone) { leftPosSearchBar = 4 } self.searchBar = UISearchBar(frame: CGRect( x:…
1
vote
1 answer

sectionHeaderTopPadding need to use below iOS 15

i want to set sectionHeaderTopPadding below iOS 15, but this property works only in ios 15. How can i set section header padding to zero below iOS 15
1 2
3
14 15