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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:49:05+00:00 2026-05-17T00:49:05+00:00

The learning curve for iPhone development has been less steep than I expected. After

  • 0

The learning curve for iPhone development has been less steep than I expected. After following some tutorials and the excellent book “Beginning iPhone 3 Development” by Apress things have gone quite ok. And of course when I got stuck this forum has been a great help so far. Until now I never did any ‘graphical’ programming on any platform I worked on in the past so this is highly uncharted territory for me in general en on the iPhone specific. I haven’t been able to find a great source for info yet so I hope that some here can either help me directly or pinpoint me to a source (book, site) with the walhalla of drawing 😉

What I want to make is a gantt chart like drawing. The blocks should have some text on it explaining what that block is about and a button (custom shape eg a star) where the user can tap on. The button needs to change color when it’s toggled.

What I’ve been able to find and try out is: create a separate view, and then implement this code on that view:

- (void)drawRect:(CGRect)rect {
    //Get the CGContext from this view
    CGContextRef context = UIGraphicsGetCurrentContext();


    //Draw it
    CGContextStrokePath(context);

    //Draw a rectangle
    CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
    //Define a rectangle
    CGContextAddRect(context, CGRectMake(40.0, 10.0, 100.0, 60.0));
    //Draw it
    CGContextFillPath(context);
}

So far so good but I’m stuck now. My problems are:

  • the (0,0) coordinates are top left in portrait mode, but my chart needs to be viewed in landscape mode, and converting everything isn’t that easy afaik, so I was wondering if I can change the coordinate system.

  • How do I draw text in that rectangle

  • How do I know the rectangle is big enough for my text

  • How do I create a functioning button in that rectangle

  • Less important but while I’m asking… How do I draw a more fancy block in the chart. The current block is just a plain flat color, but it would be nice to draw a block a bit more iCal-like (with gradients).

a big TIA !!!

  • 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-17T00:49:06+00:00Added an answer on May 17, 2026 at 12:49 am

    About how to draw text and fix this into the rectangle, you can see this article.
    NSString UIkit addon provides some extra methods for drawing string with desired size.

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

Sidebar

Related Questions

As well-known, C++ has steeper learning curve than most of the mainstream languages, which
Sencha has a steep learning curve, but how does this compare to titanium? is
I have some questions regarding my MVC learning curve Goal: I want to get
I'm still on the rather steep side of the Rails learning curve, so please
I'm finding the initial learning curve a bit steep with lxml - just common
Can some people exchange their experiences about the learning curve of frameworks like Apache
I'm having a lot of difficulty with CoreData. The learning curve is very steep.
For a .net developer, what's the learning curve to get into mobile development? How
CD's been an enormous learning curve for me and there's still a bit for
I'm still in my learning curve with grails and I've bumped into the following

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.