Skip to content

Instantly share code, notes, and snippets.

@RonGafni
RonGafni / Analog Clock
Last active August 29, 2015 13:55
Objective-C draw simple Analog Clock
-(void)clockHoursWithCenter:(CGPoint )aCenter view:(UIView *)view radius:(NSInteger)radius
{
NSArray *hoursArray = [[NSArray alloc]initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12", nil];
UIView *aView = [[UIView alloc]init];
aView.frame = CGRectMake(aCenter.x - aView.frame.size.width/2, aCenter.y - aView.frame.size.height/2, 10, 10);
[UIView animateWithDuration:.3 animations:^{
for (NSString *hour in hoursArray)