Xcode files (such as view controller.h) aren't showing up. - xcode

I just wanted to know why some of my files aren't showing up on the Xcode side bar. I was watching this
https://www.youtube.com/watch?v=wNAPy2LqcrY&spfreload=10
video tutorial, and I noticed that my sidebar looked different. I didn't have any of the special files or view controllers. I only have the main.storyboard and viewcontroller.swift
Could you please help me with this?
Thanks!

It is because he already started. You need to also use Objective-C and not Swift if you want to follow that tutorial. If you look in the description of youtube video, he has links to all the other files and his completed project.

Related

How do I get to see the contents of my just made .plist?

I just made a new file: "VideoNames.plist". Usually the template is shown in the editor. But it is showing up empty. Before updating to Xcode 13.3 I did not have this problem.
When I go and look up the file, the template contents is there.
So how do I convince the editor to show it in plist or xml format?
Thanks in advance.
Got it!
It turned out that I accidentally had tapped the Enable/Disable Code Review button. Tapping it again brought back my .plist as well as several other missing windows, like fx Assets.xcassets.
Thanks anyway! I appreciate all the good answers, I have found here on this site.

Can't see launchscreen.storyboard in Xcode13

I've been searching for an hour and can't find the answer.
I can't seem to "activate" see the launchscreen.storyboard option in my Xcode13 project.
I attach a screenshot of what I'm seeing.
Xcode13 not Showing launchscreen.storyboard
You are right, you are not able to see LaunchScreen.storyboard in your XCode13 project. It's due to following reason...
You might selected SwiftUI option for your development: Here if it's correct then please let me update you:
SwiftUI came with lot's of surprising updates for iOS eco-system applications. And this is one of the update from SwiftUI.
Now-onwards, we not need to deal with storyboards anymore. Yes absolutely correct. Now just two line of .plist file creates Storyboard for us. Please have a look how you can achieve it.
Apple has provided a new Key in the info.plist to help you create a basic LaunchScreen.
Please go though following examples :
https://www.avanderlee.com/xcode/launch-screen/
https://danielbernal.co/creating-a-launch-screen-with-swift-ui/
That's it. How cool is it? Hope you now understood it :-)

Xcode 6, Yosemite Mac app help book: topic unavailable

I am attempting to make a simple non-localized help book for my Cocoa application. I've made a .help file with the structure described in the somewhat out-of-date Apple Help Programming Guide.
When I run my app in the debugger from Xcode, the help item is correctly listed under the help menu. But selecting it just brings up a dialogue with "The selected topic is currently unavailable".
Opening the help bundle and going to the title page html file (in Safari) correctly navigates the structure of the help folder. This is only 3 pages. It seems like the help viewer is not getting to the title page. What is the correct structure of the help bundle and the related plist values for the help viewer to work?
I have:
contents/
Info.plist
Resources/
English.lproj/
title page.html, help index, pigs folder, sty folder etc
thanks
r

Images not all showing up on simulator but shows in storyboard

I am pretty new to iOS development and I was poking around in storyboard in Xcode 4.5.2. I started a new tab bar project (5 tabs) and then dropped in some images (UIImageViews objects) to them, everything looked good and the build came out fine on the simulator but not all the images are showing up. The same image would be showing on the Firstviewcontroller but it won't show on another viewcontroller. And I can't seem to add new image objects into the firstone (meaning i can place it in the storyboard but new ones won't show up on the simulator), It almost seems to be showing cached screens. For example, I just randomly place images all over a viewcontroller and then shifted them around and ran the simulator again but the positions do not match.
Does anyone have any information or experience with this on Storyboard?
Thanks in advance.
Ray
In my case when I have created new project in Xcode 6 I can not show the images in the Simulator and as well as in device. I have imported all the images in the image assets making a folder within that.Now I have imported all the images, all are working fine now. All images are now showing now.
Follow these steps:
STEP 1:
STEP 2:
STEP 3:
and then Import images which you need. Reference Link:
StackOverflow link
I had a similar issue. But later found out that this was because I had put the images in a real folder in the app directory. So there was my project's folder, which contained another folder named 'Assets' which contained the images. This was solved when I moved my images out of the folder and put them in the project's root folder.
In my case the picture was a JPG and not a PNG.
Replacing image in xcasset for the same image converted to PNG was the trick.
Restarting simulator fixed my problem. I think it was a cache problem.
NOTE: I'm using iOS 10 with xcode 8
I encountered this problem after I refactored storyboard.
The possible solution:
- Go to Storyboard and select the image you don't see in the simulator.
- Go to the Attributes inspector and re-select the image again.
After Storyboard refactor, sometimes Xcode assigns Unknown image to the UIImageView.
Reselecting the image solved the problem.
It happens when you change the folder for your storyboard or image. (Possibly copied storyboard from another project).
Find your Image in the Project Navigator, Select it and change it's location to (Relative to Project)
If necessary, you'd need to relink your image.
#PressRay, I have been toying around with things and have some suggestions. I have moved this to an answer, because they would have put us in chat if we kept going. But hopefully this will do it. First off, I think you should make your tab bar from interface builder, perhaps you have input some code incorrectly. You can either start one from the first screen of create a new project, or you can drag one in from the library. But it is a Tab Bar controller. Then for each of your five views, you can place a view controller on the screen for it. Then you can drag from your tab bar controller to each of the five new view controllers and select relationship tab bar controller. This will set up each vc for you.
Next I would suggest you turn off auto layout to get a feel for story boards first before you jump into auto layout and constraints. That is why I think your png's are not showing up. The two lines look like they are too close together because of some contraint moving them. To do this select the view controller, make sure it is just the view controller and then in the right hand view, go to the file inspector, it looks like a page icon. Under Interface Builder Document should be a check box for Use Autolayout. Click this so there is no check mark. Now you will be using struts and spring on each vc that you turn this off. So go ahead and turn it off on all of them.
Next you have some png files to put in. Drag your image views to wherever you want them in any of your vc's. Then hook up the png files by selecting the image view and then once again on the right hand view select the attributes inspector and under the drop down menu of Image find the png that you want. Then you can move the image views anywhere in the vc that you want. I think this will solve your problem. Let me know what happens or if you have any questions.
For xcode beta (swift 4) converted the jpg to a png file, and created a folder called images.xcassets, added the png file to the folder. It worked going to try adding the jpeg to the folder and see if the image shows up. I just tried the jpeg and its not showing up. So my conclusion is to use png files and create a folder to hold the png files. Add the folder right after the Main.storyboard. Hope this helps.
I just changed the image/file names. Sometimes if there is a continuous pattern xcode gets stumped. So if you have image_1, image_2....change to 3_image. This fixed my problem.
try to check the image properties in your project in case you haven't set them
to

How does MacOS developer navigate large code base

I am new to MacOS development. I would like to know how developer navigate code in a large code base on MacOS? E.g. webkit? I have webkit (c++) built in XCode, but the source code navigate is not that great.
I am looking for something like Java source code navigation in eclipse. e.g. display class hierarchy, e.g. caller of a particular method?
Any one has any idea?
I think what you are looking for is the "Project Symbols" item in the Groups & Files sidebar.
If you double-click it, there are more view/filters, like only showing your project's classes:
Project Symbols http://img25.imageshack.us/img25/6709/symbolbrowserwebkit.png
TextMate (commercial program) has a project browser, it's better than just using XCode to get an overview. For navigating the many files to see how the big projects are layed out, you need a good file manager, such as PathFinder.
Class Browser may help.
Project->Class Browser or Command+Shift+C

Resources