Not seeing my view in simulator using XCode 4.2 - xcode

I have downloaded Xcode 4.2 and I'm having problems viewing my project in the simulator. I'm getting a blank whit view when I run the simulator. I'm using a single view application. I created a interface .h, .m, .xib... I have connected all actions and outlets and saved everything. My thoughts are that I have overlooked something simple. again, I just started using Xcode 4.2 today. Help!

I am assuming you are not doing this
if((self = [super initWithNibName:#"MyClass" bundle:nil])) {
// do stuff here
}

This isn't enough information to tell what's wrong with your code.
That said, if create new project in XCode using the "Single View Application" template you can see how everything is hooked up and you may be solve your problem with a 'how is mine different?' comparison.
If that fails... post some code and we might be able to see the issue.
Edit: From your screenshot it looks like you are mixing storyboards and XIBs. If you are using storyboards, then you won't see .xib files. They are inside your storyboard. You can click on the storyboard file and edit the first XIB which loads when your app runs as well as create new ones. You can still do things the "old" way by just unchecking storyboards when you first create the app. On a side note, it is possible to mix storyboards and straight XIBs, but I don't think that's what you were going for.
At a guess, you created a project with storyboards, then added a XIB manually and you get a blank XIB. Try clicking on the storyboard and modifying the XIB in there. I bet they will show up when you run your app.

Related

Where did tabbed controller views go in storyboard?

Forgive but I haven't coded in about a year or two, so I haven't been following the latest update in Xcode.
Anyways, I decided to go back and brush up on some skills and I noticed right off the bat that a lot has changed.
I created a new project using the tabbed view controller set up, usually it shows in storyboard immediately upon creating the project. Now there is nothing there. Where did it go and how do I bring it back?
I attached a screenshot so you can see the simulator running the tabbed apps but not showing in storyboard.
enter image description here
You opened the LaunchScreen.storyboard. This layout appears on the screen for a few moments while the app is launching.
https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen
The storyboard that you are looking for is Main.storyboard
Notice, that there is no Main.storyboard if you start with SwiftUI
There are no specialized app templates any more. But there is still a tab view controller object in the storyboard editor's library, so just drag it into the canvas and use it. It gives you same two-child tab view controller as before.

Is there a way to open and view the storyboard in two different windows on Xcode 7?

I'm using Xcode 7.3.1 I would like to have the same storyboard open in two side-by-side windows. I tried using the Assistant Editor to manually open the same storyboard and that works fine but when I click on one side or the other the storyboard in the other window disappears.
The reason I'm trying to do this is I want to replicate parts of the storyboard to another part and it's annoying to keep navigating all over the place and trying to remember what it looked like.
No. Storyboard is a XML file, that save changes not as often as to work with it from two screens. It can lead to mistakes. However you can temporary copy UIViewControllers and place them wherever you need, replicate parts and delete them.

Storyboard corrupted

I've experienced a strange problem today. I was working on my iOS app in xamarinstudio. A modification had to be made in one of my viewcontrollers, so i opened up my storyboard to see that most of my viewcontrollers were missing! The connection between viewcontrollers was still there, in fact, my app still works, but most viewcontrollers are missing. When you open the .storyboard file in a texteditor, you can clearly see that the missing viewcontrollers all have their width & height properties set to 0! This happened suddenly, without any warning. I can't even remember exactly when this happened, because i didn't open my storyboard file right away. The only two things i did differently that day is execute the updates for Xamarin studio, mono, xCode, the emulator & iOS and i modified a .xib, so i had to open xCode. Here is a screenshot of what my storyboards looks like now:
Has anybody encountered something similar? And how did you fix it?
Try opening Storyboard as code (2 finger tap) and look around to see if there are any view controllers present. Maybe the size was corrupted to zero? You can edit that inside storyboard.

Showing views in interface builder outside viewcontroller hierarchy in xcode5

I often make use of views in interface builder that live outside of the viewcontroller hierarchy (see screen grab below for simple example).
Before upgrading to Xcode5 I could get this view to appear on the storyboard by writing an IBAction outlet and dragging a connection from the code to the view in the storyboard.
If you paused over the button for a moment it would flash and then open up as a view on the storyboard that is then a lot easier to work with.
Since upgrading this function no longer seems available. Has anyone found out how to get these views to appear on the storyboard?
Edit:
Using the temporary viewcontroller as described in this answer seems one approach, although fiddly since you need to move the UIView stack between viewcontrollers each time you want to edit the layout. Using a separate XIB is starting to seem like the sanest approach.
https://stackoverflow.com/a/13713385/1060154
Finally, we get this back in Xcode 7.
Hallelu!

Xcode 4.2 and new Tabbed Application Project

Can anyone help with Xcode 4.2 and the new tabbed application project? With Xcode 4.2, i create a new tabbed bar application, and it works as desired. However, it seems that instead of creating a new window and main.xib file that contains the tabviewcontroller, it sets everything in code within the appDelegate.
its easy to work with the tabbarcontroller via code and i have no problems setting up other tab items, however, i feel that my iOS development skills (they are new) are missing something as i would NOT even know if it was still possible to work with the tabviewcontroller graphically now in the way this project template has been setup.
Is there a way to work with the tabviewcontroller graphically? would i have to create a new main.xib file and link everything up to that? i'm still not strong enough in my skills to work out all the minute details but if that is the path that people suggest, i will look into it and try to figure it out.
I only want to work this out so i can fully understand whats going on now with Xcode 4.2, I have no unrelenting desire to only work with the tab bar controller graphically, but am curios as to why i cannot find it (or if i should)... just trying to get my head around how these things should be working.
You should use the Single-View Application template.
HEre you can add graphically that control

Resources