Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

allocate sections of the screen to different positions

Im working on a game on swift. And i would like to split the screen in to 3 sections in portrait, and name them as position 1, 2, and 3. each barrier (10px X 3rd of the screen for the device) for the game would be exactly 1/3 of the device (as there are different sizes). also i attempt to swap the position of the 3 barriers by creating an arch4random variable for random selection. my problem is setting the first third of the screen as postion 1 second third as position 2 and third as position 3 and allocate the different positions to the 3 barriers ive set?

i know this is a long question and i suppose to figure out myself but im banging my head on the table now because i cant resolve it!! if would be great if anyone can give me a hint on where to find the solution if not just start me off with the answer?

thanks so much in advance!! if i solved this problem and next time you come to australia lets go out for coffee :))))) hahahaha

cheers!!!