Posts

Post not yet marked as solved
3 Replies
0 Views
As I said above already, there is no shortage of google searches ("XCode xib examples") and tutorials that describe the theory of MacOS user interface design. The limitations of most tutorials however can be described as "how to draw an owl". What I am looking for is best practise for realistic user interfaces of a realistic level of complexity - and obviously the best of best practises will come from Apple themselves. Does such a thing exist?
Post not yet marked as solved
4 Replies
0 Views
May be there is some confusion here. Autolayout does NOT set constraints, it just computes objects layout based on the constraints. Which means it is up to you to set constraints as size. I know that autolayout doesn't set constraints. What I am talking about are the X, Y, width and height values under the "view" option in the size inspector. These entries are editable, and have values, and I have no idea where these values come from or what the effect on autolayout is if I edit the values. What makes no sense to me is that I have constraints that link (with equals) the bottom of each element to the top of the element above, and I have linked the top most element to the superview, and the bottom most element to the superview, but this is not enough to create an unambiguous layout.
Post not yet marked as solved
4 Replies
0 Views
I have tried to make sense of what "Add Missing Constraints" has done, but I can see no logical pattern to it. One of the parts that makes the least sense is that some elements (for example an "OK" button) have an intrinsic size, and resizing the window should have no effect on the size of the OK button. Other elements, such as a box containing editable text, has no intrinsic size, but would (in theory) either take the size of the surrounding superview, or would take an explicit size set by me. What is confusing me hugely is that there is no obvious way to tell which elements set a size, and which elements take a size based on their surroundings. In all cases we have a "view" section, which has an edited X, Y, width and height. Values exist in each case. Should these values be set by me (and if so, how do I know they're set by me), or should they be set by autolayout? How do I tell which is which? I am developing what seems to be a reasonable simple window. A label, a resizable text box, another label, a popup, a label, and then a tab view containing various possible options, then a Cancel and OK button. Everything in this window has a fixed size, except the resizable text box, which in theory should be as large as all the remaining space in the window. I read the docs over and over and they all make sense. I then try out what the docs say and nothing makes sense, and Xcode keeps crashing. I'm lost.