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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:09:51+00:00 2026-05-25T19:09:51+00:00

I’m developing a small iPad-app with a Ganttchart which will show Events in the

  • 0

I’m developing a small iPad-app with a Ganttchart which will show Events in the last 25 hours. I have 5 zoom levels each for 1 hour, 30 min, 15 min, 5 min and 1 min. My cells are 30 pix in width. Starting with the hourly Zoomlevel i have 25 * 30 pixels = 750 width for the content (no need to scroll yet). When zooming the cell width keeps the same, there will just be more cells and I can scroll horizontally. It works perfect for the 30, 15 and 5 mins. When it comes to the 1 minute level (a width of 45000 pixels (30 * 1500), things start to go wrong. The scrollview freezes (I still can kind of scroll, but the display isn’t updated).

The drawRect: has been run through (so it should have been drawn correctly). I can see a small scrollbar at the button (it even reaches the end). So I tried to wary the width and it seems that the problems starting at about 16300 pix width.
Is there a work around for this? Or any kind of solution?

I use a ScrollView with an included uiview (Ganttchartview) which drawRect: I have overloaded.

zoom in where CELL_WIDTH is 30 and the zoomLevels are 25, 50, 75, 300, 1500

 -(IBAction) zoomIn:(id)sender {
    self.zoomIndex++;
    int width = CELL_WIDTH * [[self.zoomLevels objectAtIndex: self.zoomIndex] intValue];
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, width, self.frame.size.height);
    [self.parentView setContentSize: CGSizeMake(self.frame.size.width, self.frame.size.height)];
    [self setNeedsDisplay];
}

drawRect where the lines are drawn

- (void)drawRect:(CGRect)rect {
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetStrokeColorWithColor(context, [UIColor blackColor].CGColor);
    CGContextSetLineWidth(context, 2.0);        
    int interval = [[self.zoomLevels objectAtIndex: self.zoomIndex] intValue];
    int width = CELL_WIDTH;
    for (int i = 0; i < interval; i++) {
        CGContextMoveToPoint(context, width * (i +1), START_AT); 
        CGContextAddLineToPoint(context, width * (i +1), rect.size.height); 
        CGContextStrokePath(context);
    }
    for (int i = 0; i < NUMBER_OF_ROWS; i++) {
        CGContextMoveToPoint(context, 0, START_AT + i * CELL_WIDTH); 
        CGContextAddLineToPoint(context, rect.size.width, START_AT + i * CELL_WIDTH); 
        CGContextStrokePath(context);
    }
}
  • 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-25T19:09:52+00:00Added an answer on May 25, 2026 at 7:09 pm

    I would recommend for such kind of apps the usage of an infinite scroll view. This consists in a coding trick that based on a fixed (and limited) contentSize gives the user the experience of an infinite scrolling.
    A good example has been demonstrated at WWDC 2011 so if you have a developer account you can download the videos (there was a section specifically dedicated to scroll views).
    Or you can refer to some examples in the web.
    Of course you will need to refactor your code in such way that only needed content is loaded and not the whole content which could fill the available memory.

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

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.