Pin Horizontal Spacing Between Two UIImage Views in Xcode 7 - ios

I am a beginner using Xcode 7 beta, working off a tutorial that uses Xcode 6. In the tutorial, the instructor selects Editor, Pin, and Horizontal Spacing to pin the space between two images so that it stays the same when switching to landscape. In Xcode 7, the Editor menu doesn't include a Pin menu. Does anyone know how to pin horizontal spacing between two images in the new Xcode 7?

This is close to what you need
You can choose View (current distance = 0) from the drop down menu

Use the pin button at the bottom right corner of the storyboard view. It looks like a Tie-fighter icon.
You will also notice that Pinning two elements to each other for horizontal and vertical spacing is not there. Instead select the left item and add a right constraint. Then select the right one and add a left constraint. You will see the horizontal spacing indicator appearing between the two. YMMV.
EDIT
If you are going thru the same tutorial (RW) as I am going thru, fear not! The control-drag between elements still works the same and brings the options XCode 6 shows in a similar way (ex: ctrl-drag from left to right way brings a popup menu with horizontal spacing.) I hope this helps.

Just to kind of clear this (good) answer up - select the left image, then the "pin" icon (tie fighter looking thing), click the right constraint icon at the top that looks like this:
|--|
...leave the value of it where it is. Then click the "add constraints" button. Do the same for the right image. Then run the app and verify that it works.

Related

Getting "xxx.storyboard is currently locked because it is a remote resource" in storyboard preview xcode

In xcode (7.3.1) storyboard , when we click the assistant editor and select the preview of the story board, we get the output of the storyboard design.
There is a lock button at the top, when I click that, it is getting xxx.stroryboard is currently locked because it is a remote resource and could not unlock.
Also I had other questions..
1) I could add options like iphone 4.4,4.7,3.5 inches, but I could not remove those after I added. How to remove those added?
2) I could not move the preview screen to view it and zoom it because there are no horizontal and vertical scroll bars.How could I scroll it?
lock is not an issue for you!
Second thing you can select any preview and press delete key from keyboard to remove it! and you can't scroll horizontally in assistant editor preview. You can scroll vertically by scroller of your mouse even though scroll bar is not visible!

xcode 6 webview fullscreen

I've almost pulled out all my hairs and I can't seem to find a solution. After searching and watching dozens of tutorials I'm asking here.
I have an iOS universal project in which I have only 1 webview. The whole project is set to landscape. Unfortunately it seems I cannot get this webview run in fullscreen. Whenever I have it running on my iPhone 5 the webview is only visible partially on my phone. The view is a square and centered horizontally and vertically. In landscape mode it reaches top to bottom but on the left and right side I have empty room the view did not reach.
Anyway I think it has something to do with the new storyboard feature stuff in xcode 6, but somehow I don't seem to be able to the make it working as I intend.
As said in the beginning I watched several tutorials but none of em where with only a fullscreen webview. If anyone can give me a push in the right direction I'd be glad.
Thanks in advance.
Edit:
I've added a screenshot of my project:
Hold down 'Ctrl' on keyboard.
Click and hold down click the 'Web View' item in the 'view controller scene' content list on left.
Drag the 'Web View' item up to the 'View' item in the 'view controller scene' content list on left. ( You will see blue line to link the items )
A pop up menu will appear as to how you wish the two items to interact.
There you can select, 'Equals Width', and 'Equals Height'.
Reset all the constraints of the UIWebView and then add the following four constraints:
Trailing space to superview -16
Leading space to superview - 16
Top space to container/superview - 0
Bottom space to container/superview - 0
This will make the UIWebView fullscreen and centered to the UIView.
I finally was able to found a solution to my problem. Thanks for everybody who tried to help me - it seems I was unable to properly describe my problem.
The solution to my problem was found here:
Black bars showing when running app on iOS 7 (4 inch retina display)

IOS 8 Interface builder UITableViewCell alignment

I am working on IOS app which got a UITabeView. I needed custom UITableViewCell, so i created .xib file to design it and linked it to my custom class. But I want a button to be aligned right and I cannot achieve it. The screenshot below shows my problem:
I am using autolayout. On the left side I have my .xib opened where I have a button. In the middle there is a simulator which show only a part of a button. Moreover, If a change orientation, absolute button position doesn't change (it becomes fully visible). On the right side you can see how I set constraints. Obviously, I did it in a wrong way, but I've tried everything and nothing helped. Different constraints, values, toggled autolayout - no effect.
How do I set up constraints so that my button is aligned right (on both orientations)?
P.S. I am using Swift.
you have to link your button to the view which contains it, you can press Ctrl and drag the mouse from your button to the view which contains it, Xcode will show a menu with the available constraints:
You have to select the constraints you need for setting up the position of the button, in your case it will be leading space to container, and in addition you should select width and height constraints. For selecting those constraints you can press this button on the bottom of the screen:
and in the following menu select the width and heigth constraints:
Hope it helps!

Xcode swift UIView bottom bar does not display

I'm a beginner in iOs development but I'm a web wedeveloper.
I was trying some small things on Xcode and I face a problem without finding solution or usefull information on the web, take a look to my UiView below
which is quite large, and has a bottom bar with Done button, and and another bar with some button.
But when I'm running the simulator, I can't see this bottom bar guide, I do have a button on it, I have an action on it, the "Hidden" field is not selected.
Any idea why it's happenning (Using Xcode 6 beta 7)?
Set left and right border constraints to 0, and "center horizontally" constraint as well.

How to pin button to bottom of view Storyboard iOS

I have a button that needs to "stick" to the bottom of the main view on both 3.5 inch and 4" iPhones. Currently, I can move it right to the bottom of the storyboard on a 3.5" view but then on a 4 inch view, it moves up.
How do I stick the button to the bottom of the view on both screen sizes?
Select your button which you want to pin to bottom. Click on add new constraints and select bottom constraints then click on add.
Use AutoLayout feature.
While you're laying UI components on the screen, you see some blue colored guidelines, those are just helper lines and have no effect whatsoever when you actually run the program.
Once you're done with placing all the UI components on the screen, you have to actually set the constraints for the AutoLayout using the few buttons that are placed in the bottom right part of the Storyboard view.
Is suggest that you right click on the Storyboard view, and go into "Interface Builder Help" option, and then click on "Understanding Layout Constraints" and "Aligning and Pinning Objects" to see how constraints are actually set.

Resources