James Hancock
asked on
Xcode How do I do Lines, circles and rectangles?
In a game I'd like to make,
I'd like to be able to draw filled solid rectangles and circles, in xcode for iphone
like in old GWBASIC
Is this possible?
I'd like to be able to draw filled solid rectangles and circles, in xcode for iphone
like in old GWBASIC
Is this possible?
ASKER
are there any #includes to consider, because I get errors:
- request for member bounds is something not a structure or union
- background undeclared
-image undeclared
border undeclared
What members should my .h have, then?
Will I be able to have multiple rectangles simultaneously?
Thanks
- request for member bounds is something not a structure or union
- background undeclared
-image undeclared
border undeclared
What members should my .h have, then?
Will I be able to have multiple rectangles simultaneously?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
give me a few days plz ( serious upgrades being done in shop on my MacBook )
By The Way....Important Question :)
Is programming an iPad app identical to iPhone app, but for differnt screen size?
By The Way....Important Question :)
Is programming an iPad app identical to iPhone app, but for differnt screen size?
mainly, yes. The SDK to compile with is different. The simulator is different.
This thread already contains the solution.
You may ask the related question. I'll be glad to answer.
This thread already contains the solution.
You may ask the related question. I'll be glad to answer.
2. Launch Interface Builder by pressing on the main xib-file. Find "custom view" in the Library, drag and drop it onto the application window. Set the view size - almost the whole window. In the Size Inspector (Cmd+3) set the autosizing options. In the Identity Inspector (Cmd+6) set the view name as DrawingView. Save the project (Ctrl+S).
3. Switch to Xcode and open DrawingView.m file. In -drawRect method we can add our drawing code. I attached a rectangle. The UIBezierPath class used in this code is, maybe, the most important class when you draw the graphical primitives. It allows a lot (including ellipse you asked about).
Open in new window