The goal of this work sample is to construct a sample memory game called ”Colour Memory”. The game board consists of a 4x4 grid with 8 pairs of color cards.
Here is a list of things I used to create this sample.
1) Use of sqlite database and interaction class
2) subclassing of UITableViewCell
3) subclassing of UIButton
3) subclassing of UIButton
4) Use of Auto Layout in iOS
and used to store the image name that we need to set as a image when user taps on that button.
It also contain animation code of flip view from left to right and right to left.
Here is a code to flip the UIButton and show image.
You can find this code in below given link.
Name of the file is ColorUIButton
-(void)showButtton
{
self.userInteractionEnabled = false;
[UIView transitionWithView:self duration:0.3 options:UIViewAnimationOptionTransitionFlipFromRight animations:^{
//code to change the image of UIButton
} completion:^(BOOL finished) {
self.userInteractionEnabled = true;
}];
}
UITableViewCell is used to handle the row of 4 UIButtons
It handle all the interaction done on UIButton.
You can find this code in below given link.
Name of the file is ColorCell