How to switch view controllers in Xcode 5? - ios

I can no longer simply right click and drag from a button to a view controller to create a view switch via the Modal function in Xcode 5?
I've searched everywhere, but seeing as Xcode 5 is fairly new, I can't find anything on it.
I'll continue to search the Apple Documentation just in case no one can provide an answer here, but does anyone know what's wrong?
Is this feature excluded from Xcode 5 and I am forced to code it in?

The feature you are talking about is called Storyboard Segue and it's definitely available in Xcode 5.
Be sure you are dragging from the UIButton and not from it's superview.
Restarting Xcode may also help.

Related

Instantiate to a specific position in Swift xCode

I'm looking for some help.
I'm doing a homework for school on xCode and I have an issue.
I'm trying to ma multiple magazine cover that the user can scroll through them. I created a UIScrollview that I instantiate each .xib files (Magazine covers) in it but they stack on top of each other.
What I am actually trying to do is to instantiate the covers side by side (so the user can swipe through them like snapchat's filter). Is there a way to set a certain position?!?
SPECS OF THE PROJECT:
-I'm on the latest xCode beta.
-The target is an iPad Pro on iOS 10.3
I believe UICollectionView is what you're looking for.
Try with this tutorial. It doesn't show exactly what you need but once you see how collection views work you'll realize how to implement your task (or come again for more questions :))

Swift "show segue" is not available when Ctrl Drag a button on View Controller

I'm having a very hard time here.
I created an iOS App in which I have a Navigation controller and a main screen showing a device list and now I'd like to add a detailed view. My issue is, I can't create a segue with action "Show" - the Interface Builds in Xcode only provides options "Push", "Modal" and "Custom"
I'm an absolute beginner in Swift (or for that Apple) development and each and every tutorial I found with google, says, I'd simply have to Ctrl-Click the button, drag it to the new view controller and choose "show" - but there is no :-(
I'm attaching a picture, so you might see more clearly.
Please, if someone could help me out here.
Is my problem caused by choosing Single View Application in the project???
I'm using Xcode 8, Swift 3 and developing for iOS 10 on iPhone
You are likely using the old Xcode storyboard layout, to go back to modern layout:
select Main.storyboard, go to file inspector and check the Use Auto Layout and Use Trait Variations boxes.

Segue back button disappeared in iOS 9

Before iOS 9 was released, I've developed an app targeting iOS 8.4. I've used some UITableView connected each other via segue of kind "Show (e.g. Push)". It worked perfectly with the right behavior: every time I switched from a UITableView to another, the back button appeared, so the user is able to turn back to the previous scene; the back button appeared also from UITableView to UIViewController, using the same kind of segue. Now I have upgraded to the latest version of Xcode and targeting the app to iOS 9.0, I got this problem: now, if I go from UITableView to another UITableView, the back button doesn't appear anymore, but if I go from UITableView to UIViewController, the back button appears. I've seen other developers has had a similar problem (as you can see here, here and here), but I don't understand how they have solved (except for the third link, but it's not my case). Anyone knows how can I get back button working again? Thanks in advance
It looks like the guy who posted the second link is having the same problem as you. In a comment he said that the way he fixed it was getting rid of the extra navigation controllers:
No need put the navigation controller for each view. put the navigation controller start view only.
So that is what I would suggest doing. Only put a navigation controller on the first view controller. Get rid of all the others.
So, thanks to Caleb's and ogres' suggestions, I solved my problem in this way as you can see in this screenshot, I hope it helps anyone who will have the same problem!
If you have two UITableViews and you want connect them to each other, you just need one NavigationController.

Can't find containerView Xcode 6.4

Today I tried to use a container view in Xcode and when I searched in the bar at the bottom of the Library menu, I could not find it. I have also searched through the entire list and can not find it.
Does anyone have any idea what might be occurring. I am using Xcode 6.4.
Any suggestions will be much appreciated.
It looks like the reason I can't find it is because I am using XIB's and not a storyboard (which is what I used in the past when I used a container view).
Thanks to the other answers which helped me come to this conclusion.
I am using Xcode V6.4 and searched by the name UIContainer/container in the object library section of utilities. and It is showing the container view.
You can find it in your storyboard. See image bellow.
This is definitely a bug that is still present in Xcode 7.3.1.
However, I kept playing with switching tabs and looking into other storyboards to see if I could make it find it from a different file. It turns out that after a navigating thru some of my storyboards and seeing the storyboard form the main editor (instead of doing it from the assistant editor) I was able to find it.
Hope this helps!
Oddly, there seems to be a bug in Xcode 6.4. Once I changed the tab in the lower right navigator and came back to the Objects tab, the search/filter worked again. I had the same exact problem in the same exact version of Xcode.
Like kriztho said, container view won't be listed in the object library when viewing storyboard from the assistant editor for some stupid reason. I'm using Xcode 9, and this is still an issue. Right when I switched storyboard to the standard editor (Cmd + return on Mac), the container view was listed once again in the object library.

XCode Storyboard Issue

I cant see the Labels, Button etc in the View or their constraints though the Labels and Button appears on the side of the storyboard. And when you run the program in the simulator you can see that they are there.
The project from my colleague who uses XCode 6.3.1 and I am using XCode 6.3.2
and he doesn't have this issue. When he updated his to to the same version I have he had the same problem; so he went back to the previous version 6.3.1.
Now the problem persisted on my device even when I removed the 6.3.2 and substitute it with 6.3.1
stackoverflow prevented me from uploading the images but I can send it by email to anyone to see the screen shots
I think I found the answer but yet the labels seems to be shifted out of the view. but the Answer is: This problem occurs when one of the users design the view controller using the compact or any other dimension other than Any X Any. to fix the problem, click in any of the objects created ( label, button..etc), and go the attribute inceptor, and scroll down to the bottom and you will find a check box with the word installed. there will probably be more than one. Look for the one that is not highlighted, and highlight it. This should fix the problem.
Another faster solution instead of going over each object you can deselect
Use Auto Layout
Use Size Classes
then select them again

Resources