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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:58:32+00:00 2026-06-07T21:58:32+00:00

For example in Tweetbot’s iPhone app. When you open up the app and new

  • 0

For example in Tweetbot’s iPhone app. When you open up the app and new tweets come in, it will just be appended to the top of the UIScrollView and the current tweet you see did not get refreshed. How can I achieve the same thing effect?. Say I have a UIScrollView with a UIView added to the UIScrollView starting at origin 10,10.

I then downloaded a few items and I want to put it at 10,10.. so I basically need to shift this old item at 10,10 down right? If I do so then during that shifting user’s will see it shifted, which is not the effect I want. Where as in Tweetbot’s app it seems that nothing is being shifted around, it’s just that you grow the area above the 10,10 and append new stuff’s there.

How do I do this?

Basically I wanted to implement the insertRowAtIndexPath in a UIScrollView.

  • 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-07T21:58:33+00:00Added an answer on June 7, 2026 at 9:58 pm

    Will restate the question this way: how to add content to the top of a UIScrollView without moving the content that’s already there (relative to it’s current offset).

    If this is the right question, the right answer is to do the add and shift down just as you suggested, but then scroll by the same height as added content, giving the illusion that the old content didn’t move.

    - (void)insertRowAtTop {
    
        // not showing insert atIndexPath because I don't know how you have your subviews indexed
        // inserting at the top, we can just shift everything down.  you can extend this idea to
        // the middle but it requires that you can translate from rows to y-offsets to views
    
        // shift everything down
        for (UIView *view in self.scrollView.subviews) {
            if ([view isKindOfClass:[MyScrollViewRow self]]) {
                MyScrollViewRow *row = (MyScrollViewRow *)view;          // all this jazz so we don't pick up the scroll thumbs
                row.frame = CGRectOffset(row.frame, 0.0, kROW_HEIGHT);   // this is a lot easier if row height is constant
            }
        }
        MyScrollViewRow *newRow = [[MyScrollViewRow alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,kROW_HEIGHT)];
        // init newRow
        [self.scrollView addSubview:newRow];
    
        // now for your question.  scroll everything so the user perceives that the existing rows remained still
        CGPoint currentOffset = self.scrollView.contentOffset
        self.scrollView.contentOffset = CGPointMake(currentOffset.x, currentOffset.y + kROW_HEIGHT);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example: error_reporting(E_ALL | E_STRICT); class Test {} $obj = new Test(); $obj->undeclared = oops;
Example code: List<Student> Students = new List<Student>() { new Student(101, Hugo, Garcia, new List<int>()
Example: This is just\na simple sentence . I want to match every character between
Example: You have a shortcut s to SomeProgram in the current directory. In cmd.exe
Example: public class JFrameTest { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() {
Example site: http://www.oneupme.com/ If you visit the site from IE you will see a
Example : I have 3 Activities, A,B, and C. from Activity A I open
Example Div: <div class=container> <div class=select1></div> <div class=select2></div> <div class=select3></div> </div> Now I want
Example: print max(chain_length(i) for i in xrange(1,10001)) This returns the maximum/biggest chain_length (an arbitrary
Example: $ objdump Logger.cpp.o -t 00000000 g F .text 00000000 .hidden __sti___10_Logger_cpp_0b2ae32b

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.