Answer the question
In order to leave comments, you need to log in
Why is the inscription not centered?
In general, I began to study programming for iOS. In XCode, I put the inscription in the center, I start the simulator, and there the inscription is not in the center. I suspect that the size of the iPhone is incorrectly determined in the stimulator.
XCode version: 7.2. I choose iPhone 6s Plus in XCode. I don’t have an iPhone yet, I’ll have to check everything in the simulator. Here is the screenshot:
Answer the question
In order to leave comments, you need to log in
You have centered the inscription according to the dimensions of the work area (in your example - a square) in absolute coordinates. That is, if it is set to (200, 200) in Xcode, then it will be set to the same point on the emulator at startup. To align to the center in relative coordinates, that is, on any screen size, you need to add constraints, read about Auto Layout, they can be set visually directly in Xcode.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question