ios - Xcode IB: UIButton hidden but have still buttons space -


I have the following problem in my iPhone app. In my IB, I have 4 buttons that are my UIViewController ( IBOutlet ), for example when I want to hide the second button AfwalSoorten Then it disappears, I want to, but whenever I debug an app on the simulator, I still got the position of the button.

How can I get rid of that? An example example is

Enter image details here

 Enter image details here

Is there a choice on the storyboard for the button? To clip together?

You should use autolayet or otherwise it is a nightmare with new screen sizes.

You can ask the program automatically: set the button with some obstacles, and then when you decide to hide the button, remove the obstacles that are not needed. It's flexible and powerful, but it's not the easiest way to get started.

An easy way to do this is with additional constraints. For example, if you have buttons 1, 2 and 3 (see screenshot), and you are planning to delete button 2 You can add an extra barrier between 3 and 1:

Enter image details here

This hurdle should be less priority (250 in my example) than others (1000 by default). This means that the obstruction in button 2 (with high priority restrictions) will not apply.

Then, delete the button instead of hiding it.

  [self.   

When you want to hide the button, it is still considered by the layout system to make a decision, and this makes the layout more complex if you want to keep it around the button. Make sure this property is using the strong modifier in the declaration.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -