Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mandude

macrumors member
Original poster
Nov 19, 2009
64
0
hey all I'm trying to make an app on my favorite playing card game and i need some guidance on an issue. I'm trying to make the player's hand of cards appear on the screen similar to how the iOS4 multitasking menu is. On the bottom of the screen would be a ScrollView I'm thinking and the player can simply swipe horizontally to see all the cards they have. The player is originally dealt 4 cards, so on the bottom of the screen would be the four imageviews of the cards in a scroll view. If the player only has four cards or less then I'd like a bounce back effect to occur on the sides. However if the player has more than 4 cards in their hand, (which would mean the screen wouldn't fit the entire hand), then the scrollView should allow the player to scroll to the left or right to see the rest of their cards. So my main question is how do i set up a Scrollview on the bottom of the screen, and function almost identical to the interface in the iOS4 Multitasking menu? Thats only half the trouble for me though. After i have the imageViews in the scrollView and it all works good, I would need the Imageviews (cards) be able to be touched by the user, and followed by their finger out of the scrollView and into the original UIView all help is appreciated
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

Yet in this particular game the player will usually have well over 30 cards in their hand. Overlapping is possible but I dont think it will be able to fit all the cards
 
Create a view that is as tall as you want the scroll view to be. Then set up it to be really wide, like 320*4 or 6, which would give you 4 or 6 screens.. Then just attach it...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.