0

so, I created a Single View Application and I have 30 views in my application, all of the views are the same except of a picture in the center of the view and the 'next' and 'back' buttons that will direct the user to the next screen.

my question is, do I need to create 30 views or I just can programmatically to add more views to create the stack? I mean, when the user click 'next', it will create a new view and the user will redirect to this new view with the properties that I will define for the new view?

thanks alot!

ytpm
  • 4,962
  • 6
  • 56
  • 113
  • do you have just different 30 views or 30 different screens(viewControllers) ? maybe you can explain a little more – aqs Jan 20 '12 at 18:38
  • Where did you learn ios development... Get yourself a good book... Your foundation in ios is very weak – Shubhank Jan 20 '12 at 18:56
  • Try this: http://stackoverflow.com/questions/1962658/how-to-populate-a-uiscrollview-with-uiimageviews-lines-up-in-a-row which will allow you to have some animation via a `UIScrollView`. – msgambel Jan 20 '12 at 18:56

3 Answers3

1

No, do not create 30 views. Add a single view with a UIImageView and bind it to a view controller property as an IBOutlet. When the user presses the next and back buttons, just update the "image" property of the UIImageView.

picciano
  • 22,341
  • 9
  • 69
  • 82
  • I'm sorry, maybe I wasent that clear in what in wrote. so, I have a view, this is the main view, he has a uiimageview and uilabel and 2 uibuttons. when the user click on the 'next' button, I want the screen to fade out and than to fade in with a new image on the uiimageview and with another button and another text on the uilabel. is it possible? – ytpm Jan 20 '12 at 19:26
  • Yes, you would just use animations. Fade out the UIImageView, update the image property, then fade the UIImageView back in. Look up block animations, specifically, the UIView static method animateWithDuration:delay:options:animations:completion: – picciano Jan 20 '12 at 21:52
0

It is absolutely possible to create new views. Look in the documentation for the UIView class and play around.

fzwo
  • 9,842
  • 3
  • 37
  • 57
0

You might want to go through the below doc to create app thats uses page-by-page presentation.

PageViewController

Shreesh
  • 677
  • 5
  • 15