what am I doing wrong

My app looks perfect on my storyboard but when i run it on the stimulator i get a different result. My return button isn't there on my stimulator

Replies

I guess you have not put constraints properly.

what would you advice as I do not understand what i am doing wrong

Search with "interfacebuilder constraints".

I don't understand what you mean

Put "interfacebuilder constraints" in the search bar of your browser and hit return, and then read the search result carefully.

Search here, like this:


https://forums.developer.apple.com/search.jspa?q=interfacebuilder+constraints

Probably, in XCode, the display is for a certain type of device

- and in simulator, this is another (probably smaller) device.


In Interface Builder, select the Button.


Then controlDrag from the button to the bottom left of the view

Select constraints as:

- center horizontally

- bottom space to safe area


And see what you get.

Note that there may be other objects that are not properly placed…


Now, before you move on, study some tutorial as App development with Swift.

Otherwise you will have endless problems…

I have fix the constraints and open the stimulator on different devices but still having the same issue

So please describe exactly:

- what you expect (where should the button appear exactly)

- what you get on simulator, which device simulator

- what you did:

which device is selected for display in Interface Builder

show full code

detail the constraints you have set

explain how objects are positioned in IB on canvas…