Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning iOS Game Development
This is the forum to discuss the Wrox book Beginning iOS Game Development by Patrick Alessi ; ISBN: 978-1-1181-0732-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS Game Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2012, 03:38 PM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concentration and the views

So in this game, there are 64 cards. I'm a bit confused because they are represented by a view "card" which has face-up and face-down frames of animation.

On the other hand, near the end of the chapter, we added two new views "firstTappedView" and "secondTappedView" to allow the cards to have an animation of being turned over.

I'm having issues figuring out the relationship between "card" and "firstTappedView/secondTappedView". My question is: for each of the 64 cards, are there TWO views per card or ONE view per card?
 
Old March 17th, 2012, 08:29 PM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is my guess, and correct me if I'm wrong…So this line under handletap method

CardImageView *tappedCard = (CardImageView*) gestureRecognizer.view;

Because tappedCard has an asterisk, it is a pointer and not a brand new view. And first/secondTapped are based off tappedCard, so they too are pointers.

So any time we modified first/secondTapped, since they are pointers to gestureRecognizer.view, it is modifying gestureRecognizer.view," which is is the "card".

Is that right?




Similar Threads
Thread Thread Starter Forum Replies Last Post
Views prashar SQL Language 1 December 13th, 2005 02:10 AM
multiple views cbodapati All Other Wrox Books 0 December 10th, 2005 05:31 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM
Views or not ?? stagedancer SQL Server 2000 1 November 24th, 2004 03:08 PM
Views SAM GORDON SQL Server 2000 5 July 19th, 2003 08:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.