Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 14, 2009, 11:28 AM   #1
kevy089
macrumors newbie
 
Join Date: Apr 2009
Aligning Images and Buttons Using Multiple Views

Hi,

I am creating an application with a main view and six other views that load into the main view. All of the views contain a different image that are the same size(1053x598) and all have the same set of buttons at the bottom. I am using Interface Builder. How can I make sure that ALL of the images and buttons are positioned in the same location in ALL of my views... Meaning... when I switch views I want the images and buttons to be in the exact same spot as the view I just switched from. Thank You.
kevy089 is offline   0 Reply With Quote
Old Apr 14, 2009, 02:16 PM   #2
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
Since the image is larger than the screen size does that mean that they're in a scrollview? If so the contentOffset property of the scrollview indicates how the content view has been scrolled. Just read the contentOffset from the current view and use that to set the contentView for the new view.

If you're not using a scrollview then tell us how the images and buttons are laid out.
PhoneyDeveloper is offline   0 Reply With Quote
Old Apr 14, 2009, 02:53 PM   #3
kevy089
Thread Starter
macrumors newbie
 
Join Date: Apr 2009
Thanks... I am forcing the app to load in landscape mode... Is this the incorrect size to use for my images still? I am basically adding the images to my resource folder in xcode then adding them to my views in interface builder. As for the buttons, I am creating them in interface builder as well. My hope is that I am able to align all the views using interface builder. Is that possible?
kevy089 is offline   0 Reply With Quote
Old Apr 15, 2009, 09:46 AM   #4
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
The screen size is 480x320 so your images are obviously much larger than that. If they can't scroll then I don't understand the point of having them that size.

You can certainly have several views set up with the same positions for buttons and other subviews and switch between them. You could also have a single view hierarchy and just switch an image in an imageview.
PhoneyDeveloper is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Zoom in on multiple images AnTaR3s Design and Graphics 3 Sep 27, 2013 03:04 PM
iPad Mini: iPad mini: Finger hitting multiple buttons now! bniu iPad 18 Nov 4, 2012 01:59 AM
Cannot create multiple buttons Baddicus iPhone/iPad Programming 5 Sep 6, 2012 09:05 AM
Multiple ActivityIndicator for Multiple Images Narendar Singh iPhone/iPad Programming 10 Jul 18, 2012 07:19 AM
Creating Images for Buttons BadWolf13 Mac Programming 5 Jun 2, 2012 12:59 AM

Forum Jump

All times are GMT -5. The time now is 01:26 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps