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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:00:19+00:00 2026-06-17T09:00:19+00:00

When I call insertItemsAtIndices on an AQGridView, the items are overlapping, rather than being

  • 0

When I call insertItemsAtIndices on an AQGridView, the items are overlapping, rather than being displayed in their relevant grid. It works fine if I call reloadData on the GridView, but I’d like to just add one cell at a time.

I have portraitGridCellSizeForGridView implemented, but it doesn’t seem to be getting called after an insert call.

Here’s the relevant code to insert:

[self.cartItemArray addObject:cartItem];

[self.cartGridView beginUpdates];

[self.cartGridView insertItemsAtIndices:[NSIndexSet indexSetWithIndex:self.cartItemArray.count - 1] withAnimation:AQGridViewItemAnimationNone];

[self.cartGridView endUpdates];

Here’s the AQGridView delegate methods:

- (NSUInteger)numberOfItemsInGridView:(AQGridView *)gridView {

return _cartItemArray.count;

}

- (AQGridViewCell *)gridView:(AQGridView *)gridView cellForItemAtIndex:(NSUInteger)index {

static NSString * GridCellIdentifier = @"CartItemListViewCell";

CartItemListViewCell_iPad * cell = (CartItemListViewCell_iPad *)[gridView dequeueReusableCellWithIdentifier:GridCellIdentifier];

if (!cell) {
    CGRect cellFrame = CGRectMake(0, 0, _cellWidth, _cellHeight);
    cell = [[CartItemListViewCell_iPad alloc] initWithFrame:cellFrame reuseIdentifier:GridCellIdentifier];
}

CartItem *cartItem = [_cartItemArray objectAtIndex:index];

[(CartItemListViewCell_iPad*)cell updateCartItem:cartItem];

return cell;

}


- (CGSize)portraitGridCellSizeForGridView:(AQGridView *)gridView {

return CGSizeMake(_cellWidth, _cellHeight);
}

- (void)gridView:(AQGridView *)gridView didSelectItemAtIndex:(NSUInteger)index {

if (index >= _cartItemArray.count){
    return;
}

self.selectedItemIndex = index;

[[NSNotificationCenter defaultCenter] postNotificationName:NotificationEditPrintSizeCartItem object:[_cartItemArray objectAtIndex:index]];

}

And here’s what it looks like:

Example of cells overlapping

As you can see I’m using two AQGridView’s on the screen. I wonder if that’s causing the problem? Any help is appreciated. Thanks!

  • 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-17T09:00:20+00:00Added an answer on June 17, 2026 at 9:00 am

    Ok, just solved it. Searching through the code, I noticed the following was called in reloadData:

    [_gridData setDesiredCellSize: [_dataSource portraitGridCellSizeForGridView: self]];
    

    So, now I’m calling reloadData before I add anything to it.

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

Sidebar

Related Questions

I call an image using the displayMainImage.php link below and that works fine, it
I call this method on form load ivent GetProducts( ); This Query works fine
Ajax call works, and deletes the file via unlink, however success is not called.
Call to undefined method after upgrading to PHP 5.4.0 mentions a few APC bug-reports
AJAX Call $.ajax({ url: '/api/Inventory', cache: false, type: 'POST', data: json, contentType: 'application/json, charset=utf-8',
I call from a spreadsheet module a function that does some processing in another
I call a function like this: call_facebook(103138046395999, samåkning.se, http://www.facebook.com/samakning, page); call_facebook(16089699074, Jag ska köra
Users call a web service API in my PHP code but don't properly encode
I call this function from with my code-behind: DeleteFile(Server.MapPath(/) + sitemap_index.xml) Public Shared Function
I call an URL that returns me JSON (I use JSONKit). I convert it

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.