iOS 9: Interface builder toolbar flexible space push 2nd button outside the e frame - interface-builder

In iOS toolbar I have two buttons. We have problem when I added flexible space between button and it push the 2nd button outside the frame when I run the app on iPhone 6 plus emulator? just want to ask how to fix it and make it between app frame ?

Please give leading and bottom constraint to logout button and give trailing and bottom constraint to print button. remove vertical space between this two button.
I hope this works for you.
Thank you.

Related

XCode7 ui testing: How to swipe a certain location?

I want to swipe a screen to the left. But I have no label or button whose display-label does not change or is recognizeable during recording. So I cannot find a point to grab and swipe the screen.
Is there a possibility to swipe a certain screen-coordinate?
Thanks in advance!
You can swipe directly on the app, and even the window.
let app = XCUIApplication()
app.swipeLeft()
app.windows.element.swipeLeft()
Just solved it by recording a tap on a random screen location. This gave me three lines of app.childrenMatchingType(.Window).elmentBoundByIndex(0).....element.childrenMatchingType(.Other).tap()
Somehow weird. But I changed tap() with swipeLeft() and it worked out.

Xcode auto layout buttons not resizing

I have looked at many tutorials and just can't seem to get Buttons to resize and layout properly using Xcode 6 auto layout.
The tutorials that make the most sense just use Views as examples.
Trying to build a Universal soundboard app with buttons arranged in the attached picture.
I also tried putting all the buttons in one View container but still no luck.
What am i missing?
Thanks so much
Select the button you want the constraint on, and command click it's parent view.
Next, select add new constraint (at the bottom of xcode), click "Equal Widths", then click add constraint.
Select the object.
Double-click on the constraint rectangle (not obvious! "Edit" takes you somewhere else)
Then at the right hand side of xcode the attribute inspector should
come up:
At the multiplier property you can make a ratio or a decimal of the percentage value you want. If you want the button to be one fourth of it's parent view, then set the multiplier to 1:4.
This might not be the most ideal answer, but it's the best I can offer. Hope this helps!! Good luck!
You can check out this
How to create equal spacing between multiple label in ios xcode 6.3 using AutoLayout Constraints
You can also check out Evenly Spacing Views in Auto Layout
If you still have problem then comment me I will try to fix your issue

How to collapse buttons in xcode cocoa mac

Question in short: How to collapse a button?
Question in long: I have an empty app with three push buttons that are populated in a row. When resizing window down I would like the button that is getting hidden to collapse to a lower row and vice versus.
Any help is appreciated.

App display does not fill iPad screen

I'm converting an app that I made for iPhone to be used on iPad. Using constraints on the Xcode 6 storyboard is killing me right now.
With my rep score I can't post an image of what I'm getting, but basically even when I set the constraints and the placement of the object (a UIView) on a storyboard sized for iPad, all the objects on the viewController fill only the top/left area of the screen.
What's the best way to handle this?
-- when you change size of view, other view will be auto change to {0,0,0,0}, isn't ?
but it doesn't change in the right panel.
it is your storeboard files some settings have some wrong.
Demo test link http://www.cocoachina.com/bbs/job.php?action=download&aid=80409
Check for those points:
hope this can help you.

Xcode 5, ios screen issue

when I open my iOS project in Xcode 5, I see spaces bottom and top of the view controls (in 3.5 and 4 inch screens).
There are no problem in Xcode 4. Image view is not covering all view controls area.
I am setting image view size with manually but I have 200+ view control.
How can i quickly fix ?
Have you tried to hide status bar ?
It can cause the issue you are having
If the spaces are only appearing in Interface Builder, you can tell IB what you want to see during layout. Click below a scene on the bar where the controller, first responder, files owner etc. are located. Now your whole scene is selected. Then show the attribute insepctor (Cmd+Alt+4) and select what you want to see in your scene.
Attention - this has nothing to do with your code! Its just how the scene is presented in the editor (simulated metrics)!
If this was your problem, please mark question solved.
If not, please add some more details.
Thanks.

Resources