Implementing page views.
Hello I am very new to iphone programming. I am making a sound board app with multiple views, and I need to know which is the better way to go. should I have one XIB file with several views or should I have an XIB file for each view. One more question, is there a way to switch from one XIB file to another with finger swipes.
I know how to switch them with a button, but I would prefer to do it with the swipe of a finger, like the native iphone weather app. Please show me some sample code. thank you.
I know how to switch them with a button, but I would prefer to do it with the swipe of a finger, like the native iphone weather app. Please show me some sample code. thank you.
One xib per (major/main) view generally works out best, as each view should have its own view controller which handles any of the glue between your models and view. Also it can get pretty messy otherwise.
The only difference between using a button and a swipe is the event. Instead of using a button to trigger an action, you use handle the touch events and determine if it was a swipe and then call the right action.
The docs describe how to handle swipes in "Handling Swipe and Drag Gestures" in the events section of the iPhone Application Programming Guide.
The only difference between using a button and a swipe is the event. Instead of using a button to trigger an action, you use handle the touch events and determine if it was a swipe and then call the right action.
The docs describe how to handle swipes in "Handling Swipe and Drag Gestures" in the events section of the iPhone Application Programming Guide.
MacSteve85 Wrote:I am making a sound board app with multiple views, and I need to know which is the better way to go. should I have one XIB file with several views or should I have an XIB file for each view.
I have found that, given the limited memory of the iPhone and iPod touch, the ability to split views up into different XIB files (and then dynamically load and unload them) proves a great help in managing memory. Most of the time I would not suspect that you would encounter any problem, but sometimes you can just run out of RAM - and that really sucks.
Most of the time it's a non-issue, but it's something to keep in mind nonetheless.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Turning Page Effect with OpenGl | ReSuMa | 3 | 4,656 |
May 12, 2007 05:57 AM Last Post: ReSuMa |
|
| Implementing a formula with quaternions | akb825 | 12 | 5,617 |
Oct 16, 2006 09:36 AM Last Post: akb825 |
|
| Implementing Portals | Ingemar | 0 | 2,283 |
Jun 29, 2005 04:42 PM Last Post: Ingemar |
|
| CGL , AGL and Custom Views. | anonuser | 2 | 2,533 |
Sep 24, 2004 08:18 AM Last Post: anonuser |
|

