A
A
absgeek2015-04-15 15:28:08
iOS
absgeek, 2015-04-15 15:28:08

How to change only the View part in an iOS app?

A simple application, there should be three pages: registration, login, feedback. I want to make sure that when switching from one to another, not the View itself changes, but only its functional part. Those. so that the background remains in place, and all the content changes. An example is the login screen in the LinkedIn app for iOS.
Is using Container View the only option?
As far as I understand, using a container in a storyboard can't be done without crutches? Those. Is it better to write completely programmatically? I will also be grateful for a good tutorial on this topic.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Petr2008, 2015-04-23
@Petr2008

I do not understand what you mean by "background" - a background image?
2 options come to mind:
- use the hidden property, like self.myLabel.hidden = YES;
- use Segway type Present Modally, animation NO.
In any case, there is a +-.

A
Alexey Siginur, 2015-05-05
@siginur

I would not bother and make my own View for each window and that's it. This simplifies things a lot. But if you need exactly one, then there are several options:
1) Container View
2) Do everything programmatically
3) Create 3 IBOutletCollection, one for each page. This is a much better option than doing every object hidden = YES.
the first option has a lot of crutches (to be honest, I haven’t mastered it properly), the second is an amateur, and the third is the most optimal in my opinion! So you can change which view you need and with one line remove the page that you have now and display the one you need. In this case, everything happens on one View and the background, as you put it, remains.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question