So I started a project by adding my code to an existing project. The previous project used a res file to hold its icon, and loaded the res in the dpr.
Anyway, if I go to the Project->Options->Application... I should be able to decide what icon I want to use for my project ( using Load icon... button)
But my icon and Load icon button are disabled, and I have no idea on how to re-enable them.
I really dont want to start a new project from scratch now, and move the whole code there. It would be a huge waste of time.
I never had this problem before...
Anybody has any idea why this happens?
Again, how do I change my application's icon?
You should be able swap the icon image just use the same name and delete the old image.
Related
I have created a simple application for my Mac using Automator. I am trying to change its icon from the default robot icon, but anything I try does not work. I have tried copy-pasting the image I want using the Get Info technique, but that didn't work. I also converted the image I want as my icon to a .icns file and put it in the resources folder inside the package contents folder for the app. I also renamed that icon to AutomatorApplet.icns. This technique did not work either. Are there any other techniques I can try, or am I simply doing something wrong?
The copy-paste technique actually works. The one thing I realized I missed is to select the image. You need to hit command-a to "select all" before you can copy the image you want to use as your icon. Then to paste the image onto the app/file you want to have the image as an icon for, just select the item and hit command-i. The get info panel opens and you will need to click on the icon on the top left. Hit command-v and your new image should be used as an icon.
Even after deleting derived data many times, and trying other things, I am still facing this problem. Can you help me?
You can try using the shortcut key instead, to open up the assistant editor.
Shortcut key: -
option + click on the file which you want to open up in the assistant editor
Guys I just stop dealing with this problem by changing the settings in xcode 9.2. And now i use Navigation Pane.
Here is how it works :
Ok now if you go to xcode -> preferences -> navigation
and Choose the "Uses Focused Editor" as in the picture below.
Now you can manually select inside the Navigation Pane.
Just click whichever page you would like to change and select in the Navigation Pane.
Here is a few screenshots :
Pictures shows code files but it works with everything you can click in the Navigation Pane.
Try to drag and drop file from the Project Navigator into the path of the Assistant Editor as temporary fix.
You also can click on this icon to bring recent files.
Try to clean your project, clean Build Folder, restart Xcode.
Make sure the view controller in your Storyboard has correct custom class name.
I think I know the problem you're having. I experience it too, but it's intermittent. Sometimes clicking Manual shows me the entire project folder and I can select the editable classes, but other times it only shows the interface versions of them, which aren't editable and cannot have IBOutlets dragged to them (you can tell b/c it'll say internal class and has less code). I have noticed that if I toggle back and forth between Automatic and Manual, I can usually get the editable class to appear. I also will toggle the assistant editor off, select a different View Controller or two on the storyboard, then go back to my original one, turn the Assistant Editor back on, and it starts working again.
There are other discussions of it here, here, and here. This suggestion of turning off indexing sounds intriguing and worth a try if the problem keeps reappearing. UPDATE: This trick with hitting the + and opening a 2nd file, then closing the interface file, worked great when I tried it just now.
Here are pics of how the Automatic side shows the actual file when the Manual side only shows the interface, which says internal next to class:
I was doing some work on my iOS app and all of a sudden, something really strange began to happen:
For a second or so after I open my workspace, all of the files that I've added to the workspace are visible in the left sidebar as they should be. But after this second passes, a large chunk of these files vanish from the left sidebar. And it's not like they're completely gone - I can see the entire directory structure and files through the dropdown view, as shown in the attached screenshot. But as can also be seen in the attached screenshot, I cannot see this same information in the left sidebar.
And it's not because I haven't actually added these files to the workspace. I have - when I try to add the files again, all of the files are greyed out...meaning they've already been placed in the project.
I've tried restarting Xcode and restarting my Mac. I'm thinking about deleting the .workspace file and re-running pod install, but I don't want to do that until I've ruled out other options...that I might not be aware of but someone here might be able to quickly point out.
I've tried searching for this particular problem on Stackoverflow and on Google but to no avail.
Help would be much appreciated.
Look at the bottom of the left sidebar. You have selected the second icon (in blue) which means, you are displaying only the recent files of your project. Unselect it to display all your files.
I know how to localize storyboard elements like label, buttons etc. However, I faced a problem where I need to localize the images that were setup in a storyboard in the attribute inspector for the Image View.
Is there a way to localize those without setting those images up in the code, in the viewDidLoad method and calling setImage:[UIImage imageNamed: NSLocalizedString(...)]; ?
Any kind of help is highly appreciated!
I guess I figured it out...maybe not the ideal way of doing it but works for me...
Open image folder in your Project Navigator (panel).
When you click one of the images, on the right (Inspector panel) you'll see the button "Localize".
Clicking on that button gives you a pop-up asking if you want it to be the base (in my case I say yes).
So now in the inspector there're check boxes: Base, language 1, language 2 etc (language n - is the languages you added to your project in the localization settings).
So now if you put a check mark into one of the language check boxes, your image file will have a drop down arrow showing that it has some content inside. If you click that, you'll see how it expands showing the localized files with the name of the language in the () brackets.
However, at this point those files are all the same as the base. So now you need to substitute the base files with the localized ones.
If you right click on the file that needs to be localized, say myImage.png(German), open it in Finder, and replace that file with the right one. Important! The name of the file should stay the same!
I'll post the screenshots later, so it's all clear how to do it.
Using Xcode 9.2
you can achieve it easily like the following
1- From Assets
2- Then you will need to change the Direction option AND CHOOSE BOTH
xcode will allow you to add 3 more image for other language resource
3- add your needed image and use it in story board or from code as well
Some time ago I adapted my Xcode workflow using the "tab-approach" as described by Brian Webster on his blog. It takes some time to set it up but I really enjoy working like that.
However, sometimes I open a file by double clicking it in the project manager, opening it into a new window. Not really a problem I thought, but it seems that the last window you close in a project will become the main project window, forgetting my tab-based workflow when I reopen the project. It happens a lot that I accidentally close the main window first, and then see that I still had a window open on another screen.
I reached the point that I am fed up reconfiguring it all the time, creating all these tabs again.
Does anyone know how to solve this - is there for example a way I can save the current configuration of tabs and their opened files?
The only way I was able to solve this was by going to Xcode>Preferences>General and changing Double Click Navigation drop down to Uses separate tab. I know this is not the ideal solution, but it works for me.