Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 224517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:19:26+00:00 2026-05-11T19:19:26+00:00

I display an UITableView, and from time to time, the first row appears at

  • 0

I display an UITableView, and from time to time, the first row appears at the bottom of the view.

There is nothing above the first row, and the empty space isn’t touchable.

So far, I’ve checked:

  • headerView of tableView : is empty
  • use plain UITableViewCells
  • check the rowHeight of the cells
  • check the frame of the cells
  • when the bug happens, there is no memory warning before
  • check the contentOffset of the table scroll view

This bug appears only on the iPhone, never on the simulator.

The screenshot shows on the left the correct tableview, and on the right the view with the bug. When doing the snapshot, I touched the screen so the scroll bar is visible.

Any idea in what direction I should look?

I just saw the contentSize of the tableView scrollView is wrong: I have 84 cells @ 67 pixels and 1 cell @ 57 pixels height: total should be 5685 but is 6005. (off by 320). Strange.

Stephan

alt text http://www.quicksnapper.com/files/5161/18374733084A0B3EA24D152.png

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:19:27+00:00Added an answer on May 11, 2026 at 7:19 pm

    So I found the solution to my problem:

    Adding an NSLog(@””). This is weird.

    In my viewWillAppear, I have

      if (searchByCuisinier || searchByResto) {
        NSLog(@"Will set tableHeaderView");
        self.tableView.tableHeaderView = searchBar;
        if (searchByCuisinier) {
          searchBar.placeholder = @"Cuisinier";
        } else {
          searchBar.placeholder = @"Restaurant";
        }
        searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;
        searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
        if ([filteredList count] == 0)
          [searchBar becomeFirstResponder];
      } else {
        self.tableView.tableHeaderView = nil;
        NSLog(@""); // Magic!
      }
    

    Adding the NSLog(@””) solves the bug.

    Also reversing the test:
    Instead of

      if (searchByCuisinier || searchByResto) {
    ....
    

    I do:

      if (!searchByCuisinier && !searchByResto) {
    ....
    

    I have absolutely no idea why this works (or why it doesnt work without the NSLog).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If your source project is a web service project, you… May 12, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer Switching to swfobject2.2 to embed the swf alleviated the problem… May 12, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer Can you import elementtree within the django shell: python manage.py… May 12, 2026 at 11:14 am

Related Questions

I am creating a custom UITableViewCell to include an UIImageView and some related text.
I'm playing around with a really simple game for the iPhone based on the
My app is made up of a TabBarController, each tab with a UITableView. On
first let me start by saying I'm pretty new to iPhone, so I apologise

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.