Skip to content

Commit

Permalink
Edited README.markdown via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho4d committed Jul 10, 2011
1 parent 4e8c5e6 commit 313bd52
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,29 @@
## How to use
It can be initialized with the default style:


//ClockView with default style
ClockView *clockView = [[ClockView alloc] initWithFrame:CGRectMake(0, 320, 100, 100)];
[aView addSubview:clockView];
[clockView start];
... do your thing here :)
[clockView stop];
[clockView release];

ClockView *clockView = [[ClockView alloc] initWithFrame:CGRectMake(0, 320, 100, 100)];
[aView addSubview:clockView];
[clockView start];
... do your thing here :)
[clockView stop];
[clockView release];

Or it can be customized:

ClockView *clockView = [[ClockView alloc] initWithFrame:CGRectMake(-15, 0, 350, 350)];
[clockView setClockBackgroundImage:[UIImage imageNamed:@"clock-background.png"].CGImage];
[clockView setHourHandImage:[UIImage imageNamed:@"clock-hour-background.png"].CGImage];
[clockView setMinHandImage:[UIImage imageNamed:@"clock-min-background.png"].CGImage];
[clockView setSecHandImage:[UIImage imageNamed:@"clock-sec-background.png"].CGImage];
[self.view addSubview:clockView];
[clockView start];
... do your thing here :)
[clockView stop];
[clockView release];

This is just a sample :)
ClockView *clockView = [[ClockView alloc] initWithFrame:CGRectMake(-15, 0, 350, 350)];
[clockView setClockBackgroundImage:[UIImage imageNamed:@"clock-background.png"].CGImage];
[clockView setHourHandImage:[UIImage imageNamed:@"clock-hour-background.png"].CGImage];
[clockView setMinHandImage:[UIImage imageNamed:@"clock-min-background.png"].CGImage];
[clockView setSecHandImage:[UIImage imageNamed:@"clock-sec-background.png"].CGImage];
[self.view addSubview:clockView];
[clockView start];
... do your thing here :)
[clockView stop];
[clockView release];

Example of ClockView.
*Big*: Customized style,
*Small*: Default style"

![Example of ClockView](https://github.com/nacho4d/ClockView/blob/master/clock/Images/OutputSample.png?raw=true "Example of ClockView. Big:Customized style, Small:Default style")

Expand Down

0 comments on commit 313bd52

Please sign in to comment.