cs193p – Assignment #3 Task #4

Please note, this blog entry is from a previous course. You might want to check out the current one.

The user must then be able to choose matches just like in last week’s assignment.

In storyboard add a tap gesture to the collection view and connect it to the flipCard method and done.

… actually … nothing will happen yet. Because the view does not know it has changed. It is necessary to call setNeedsDisplay when one of the properties has changed:

- (void)setColor:(NSString *)color
{
    _color = color;
    [self setNeedsDisplay];
}

- (void)setSymbol:(NSString *)symbol
{
    _symbol = symbol;
    [self setNeedsDisplay];
}

- (void)setShading:(NSString *)shading
{
    _shading = shading;
    [self setNeedsDisplay];
}

- (void)setNumber:(NSUInteger)number
{
    _number = number;
    [self setNeedsDisplay];
}

The complete code is available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published.