summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-06-12 20:28:27 -0600
committermo khan <mo@mokhan.ca>2013-06-12 20:28:27 -0600
commite8bcf8c913973d1b846927f2e2f7e2f8d10498d7 (patch)
treeda4d5560eb858ba7d4e507bcdab107651e1d3abf
parenteeef39217533c6741b1c3cdb3cf44558bde1eeb5 (diff)
draw a green ball
-rw-r--r--Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstatebin12228 -> 12228 bytes
-rw-r--r--Wobble/Ball.m21
2 files changed, 11 insertions, 10 deletions
diff --git a/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate b/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate
index fcad22d..4746fca 100644
--- a/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/Wobble/Ball.m b/Wobble/Ball.m
index 60abd07..c4f41b5 100644
--- a/Wobble/Ball.m
+++ b/Wobble/Ball.m
@@ -4,20 +4,21 @@
- (id)initWithFrame:(CGRect)frame
{
- self = [super initWithFrame:frame];
- if (self) {
- // Initialization code
- }
- return self;
+ self = [super initWithFrame:frame];
+ if (self) {
+ // Initialization code
+ }
+ return self;
}
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
- // Drawing code
+ CGContextRef context = UIGraphicsGetCurrentContext();
+ CGContextAddEllipseInRect(context, CGRectMake(5, 5, 65, 65));
+ [[UIColor whiteColor] setStroke];
+ CGContextSetLineWidth(context, 5);
+ [[UIColor greenColor] setFill];
+ CGContextDrawPath(context, kCGPathFillStroke);
}
-*/
@end