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

  • SEARCH
  • Home
  • 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 9023573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:47:35+00:00 2026-06-16T05:47:35+00:00

I am trying to create message screen where I put a UITableView in a

  • 0

I am trying to create message screen where I put a UITableView in a view with a UITextField and UIButton in its footer.

Problem starts when there is no data or less data for UITableView and its footer reaches to the Top, which should not be, like in below pic.

enter image description here

It suppose to be in the bottom or I could align my UITableView to the bottom as if it has less data atleast footer (which has UITextField and UIButton) should be in the bottom, like in the below pic

enter image description here

I controls hierarchy is like this

enter image description here

Please help, to keep TextFiels and button in the bottom either It has data or NOT.

  • 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-06-16T05:47:36+00:00Added an answer on June 16, 2026 at 5:47 am

    Under most circumstances, your shouldn’t need to put a UITableView inside a UIScrollView since UITableView is already a sub-class of a UIScrollView.

    As for the question you asked. Do you really want the text field and button in the table? When you consider most texting apps you want the text field to always be visible, regardless of scrolling up and down through the messages. As such you might want to take it out of the table and put it on the bottom of the screen below your table. Which would incidentally also solve your problem.

    Maybe you REALLY want it as a footer. You can still do it. There are 2 ways to accomplish the task.

    1. Check the combined height of all your rows + height of your footer. If this is smaller than your screen space, increase the height of your footer to fill the rest of the space. You’ll have to make sure the text field/button aligned to the bottom of your footer.

      // where 'footer' is the view of your footer
      CGFloat newFooterHeight;
      if (sumRowHeight + defaultFooterHeight < view.frame.size.height) {
          newFooterHeight = view.frame.size.height - sunRowHeight;
      } else {
          newFooterHeight = defaultFooterHeight;
      }
      
      CGRect alteredFooterFrame = footer.frame;
      footer.frame.size.height = newFooterHeight;
      footer.frame = alteredFooterFrame;
      
    2. Do almost the identical thing as above, but instead of buffering the size of the footer, you increase the height of the last row.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create instance of AccessToken but its raising exception message. I
I am trying to create a keyword message style method, but I can't figure
I'm trying to create a very simple message board (author, text, and date written)
Trying to create a black line in my view to separate text blocks but
What I try to do Hello Guys, I'm trying to create a Login-Screen which
Possible Duplicate: UIAlertView not showing message text I am trying to create a simple
I'm trying to create a pretty basic chat screen with a ListView displaying the
I'm trying to create a message box with a down pointing arrow. I want
I am getting this error when trying to create a message on a queue
I'm trying to create a custom dialog for blackberry... public class cusDialog extends Screen

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.