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 8271503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:51:55+00:00 2026-06-08T06:51:55+00:00

Part of an app I’m working on involves a messaging interface which I’m trying

  • 0

Part of an app I’m working on involves a messaging interface which I’m trying to make similar to the iOS Messages app’s interface. When new messages are received or sent, I’d like the table view to scroll down and display the insertion animation.

So far, I’ve essentially done this:

- (void)didReceiveNewMessage:(...) {
    [messages addObject:...];                            // add the new message to an array
    NSIndexPath *newIndexPath = [NSIndexPath ...];       // find out where the new cell goes
    [tableView insertRowAtIndexPath:newIndexPath ...];   // animate the insertion of the new message
    [tableView scrollToRowAtIndexPath:newIndexPath ...]; // do the scrolling
}

This works if messages are coming in slowly. However, if I send myself a bunch of messages really quickly, I’ve noticed the table view will “become confused.”

For example, if I quickly send the messages 1, 2, 3, 4, 5, 6, the table view will animate the insertion of 1, 2, 3, and 4, and then just stop scrolling. If I actually scroll the table view down manually, I can see 5 and 6 below. Anyone know of a better way to do this?

I did try setContentOffset: to scroll the table view, but this had the same effect.

  • 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-08T06:51:57+00:00Added an answer on June 8, 2026 at 6:51 am

    The underlying issue here is that I was lazy and used CGAffineTransformMakeTranslation instead of manually computing the new frames, because I forgot that when the transform property is changed frames become “undefined” according to Apple documentation.

    It ended up working okay until lots of messages came in at which point the table view’s frame would get messed up and offset somehow which would cause the bottom of the table view to be displayed slightly lower than it should’ve been.

    Lesson learned: Don’t mix frame computations and transformations in one animation. Either keep everything in terms of frames, or keep everything in terms of transformations and use center + bounds.

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

Sidebar

Related Questions

Part of an app I am working on includes a log file viewer, with
This part of an app that I am working on, I have the following
I'm running into a confusing part of IOS App distribution. So I need a
Reinstalling a Rails app on a new server. Part of the app can fork
In my app as part of my settings I set :public, Proc.new { File.join(root,
Part of my app has a photo browser, somewhat similar to Apple's Photos app,
I'm developing a two-part app, where companion apps are installed on an iOS device
Actaully i developed an Asp.net website which has a PDA app part. The case
I have to use DevExpress's Xtra Reports which is in a third-part app. I
One part of an app I'm currently working on will work as a tuner.

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.