osx - How to center 2 buttons in Cocoa? -


I have an OS X app in which the buttons are next to each other buttons are well-focused.

non-sized window

But when I press the window Change the shape, the buttons stay in one place.

resized window

How do I align buttons so that they Can the window change again when they are always centered?

As you are using XCode4.6, by default it will be in Autolayout mode.

You have to change it to a manual layout (which I'm finding it easy to do)

How to:

Click on XIB

Do not use auto layout

 Enter image details here

Navigate to - & gt; Box Enter image details here

box Select - & gt; Specialty Inspector - & gt; Title Status None & amp; None of the border type Enter image details here

Choose texFiled - & gt; ; Size inspector Enter image details here

Select the box - & Gt; Enter image details here

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -