xcode: Problems connecting main storyboard - ios

I am following the tutorial here. I just created my first storyboard and tried to set it as the main storyboard. After following the tutorial I clicked the run button and the simulator doesn't render any of the changes ive created.
I have a screen shot of my xcode project here(not sure how else to display it): https://app.box.com/s/okw7jlzq5zmcetd5cehu
What am I doing wrong?
Here is another screenshot of the storyboard itself: https://app.box.com/s/jt6i0an3maowwvgsamk7

Place a checkmark in the box "Is Initial View Controller" for the view controller you want to load.

I think your problem is the code in the app delegate. When you use a storyboard, you don't need anything in there except "return YES". The storyboard creates the window, so the code you have in there is making another window, not the one that your storyboard controller is a subview of.
Using this tutorial might teach you some things about the structure of an iOS app, but if you just want to make an app with a storyboard, you should start with the "single view" template instead of the "empty" one. It will give you a storyboard and an initial controller.

Related

Cant control drag a reference object to the ViewController in Xcode 9.2 (9C40b) iOS project

How to a create an outlet for an iOS control on the storyboard that is connected to my swift ViewController code?
All the tutorials for iOS development show that you can control drag a UI element to your ViewContoller swift code for an outlet. However it never works for me, it shows the blue line from the storyboard, but on the drop it never brings up the dialog to add a new outlet.
Creating a new Action drag and drop works just fine for buttons. I have seen many ask this question and there seems to be no definite answer.
Is there something different with iOS projects?
I tried to set the View Controller custom class to my specific ViewController class, and then I can drag and drop a new outlet. However the project fails to compile.
LaunchScreen.storyboard: error: Illegal Configuration: Launch screens may not set custom classnames
I seem to be missing something here, but all the tutorials I watch/read (none seem to cover Xcode 9 or swift 4) all show this behavior as being the normal way to create an outlet.
Launch screens are not able to have outlets attached to them. They are static. If you'd like to have a "launch screen" that you can manipulate, duplicate your launch screen layout into an initial view controller and do what you like there.
I think this is because you are connecting it from the LaunchScreen.xib instead of the main.storyboard files.

Main interface can not be changed to my own storyboard

I'm happy to know that zero code is needed to create interface for iOS app using storyboard somehow, but failed to show my own storyboard by changing 'main interface' of project setting in XCode.
Launching app brought me to a black screen which is expected to be a tableview within a navigation.
Having set Colorboard.storyboard as interface should add a grey arrow line pointing to navigation controller in the storyboard....however there wasn't such line.
Xcode I am using is 6.3...I am wondering if there is something I missed?
As far as I see you didn't set the initial view controller for storyboard.
In Attributes inspector select the param called "Is Initial Controller"
More details in documentation.

Mapview in tabbed application in iOS

I would like to ask something, because as a beginner I do not have any idea anymore
how it could work.
First of all I made a new project, a single view one and added a simple map view.
This worked very well (following a tutorial of course)
Now I tried to add this simple map view to my inital project, which is a tabbed based on with navigation controller.
In this tabbed application I already added two more views with view controllers, and I called them thirdview Controller and forthview controller. The vc's I gave the class thirdview and forthview controller.
So, now I wanted to make the mapview on the thirdview. I did exactly what I did in my "trial project" but it is not working. Well, when I run the simulator I see a map. But it does not show the location as I have specified it inn the thirdview controller.m
Because it was working in the singleview project, I guess I have something to add or to connect in my inital tabbed application?
I would be greatful for any help on this
Thanks a lot
What you have there, as I can see from what you say, is a very simple and litle forget made by everyone who begins with xCode :)
Try to link your viewControllers and your map (in the xib or Storyboard) to your file's owner' view and delegate.
by default, these aren't linked. Just right click on it and drag your View and delegate to your file's owner.
Also, be sure that each of your viewControllers' classes are really thirdview and forthview in the properties (don't be confused with xib identifier!)
Hope this helped you! Feel free to ask if anything is missing :)

Using Storyboard how to interact with viewcontroller objects

I've reviewed many websites and youtube videos that have IOS 5 storyboarding information. Most of them are pretty basic and only describe how to get started with storyboarding and how to segue into other views. I'm interested in taking it a step further and actually adding custom code to the views contained within the storyboard.
Is the "normal" workflow when creating an IOS app using storyboard?
Create the layout of an app using storyboard (adding views and objects to those views).
Create viewcontroller files (.h and .m), one for each view contained within the storyboard.
Hook up the scenes from the storyboard with your own view controller subclasses by editing the "class" values in Identity Inspector.
I believe I followed those steps, but when I implemented step #3 above and ran my application, I was only able to see a black screen. The view I had created in storyboard wouldn't display.
You have the right steps. Make sure you create your .m and .h without a xib. Post your code for the view controller for your first view to get more help.
yes, this is the normal workflow. have you set the "initial viewcontroller? ?
see this image: http://dl.dropbox.com/u/31437518/Screen%20Shot%202012-01-24%20at%2012.29.34%20AM.png
It sounds like you made a storyboard file but it isn't being loaded.
Do you have the main storyboard setting in the target summary screen filled in?

Xcode storyboard UIWebView won't load

So all I want to do is create an App that has two pages: one with a button that opens up a UIWebView in the second. It seems simple enough, yet I have spent the past two days trying to figure it out.
I create the object and put in the code for the link and ctr - drag the web-view to the controlview.h but nothing will work.
Does anyone know a tutorial or can explain this to me? I have been searching the web for the pat two days and have gotten nowhere. thank you.
Each "page" should be a separate view controller. You open the storyboard editor, drag a view controller to it, drag a web view to your new view controller, then drag a segue from the appropriate control on the first page to the second page.
You will also need to create a UIViewController class for the second page, and set the controller's identity in the storyboard editor. (Select the second controller, type command-option-3, enter the view controller's class name in the "Custom Class" section.)
In the second view controller you will need some code to make the webview do something, obviously, so you probably will want to create an outlet for the webview.
Maybe you should start out with this general guide on View Controllers. You'll learn how to use View Controllers and how to present Modal View Controllers.
After that you go on with the documentation about UIWebView.
If you do a quick search for UIWebView you'll find tons of tutorials, but basics are important :)
CONTROL+DRAG does not work on storyboard. When I click view and drag to UIWebView, it opens a black popup but I cannot see my web value. I just see "view".
It does not work on storyboard either. I tried it on xib and it works with that.

Resources