Xcode 7 (7A218) changed the default search in file preference.
In case that there are more than one occurrence of the searched text the next item will not move to the beginning of the file. It used to be circular, but now it is just one way.
Is there any way I can alter this to switch back to circular?
Edit Find options -> Mark as Wrap
Related
As you can see, I have added a custom code snippet and a shortcut.
Problem is that my snippet is //ABC and my snippet shortcut is //
Now when i select the snippet from the autocomplete feature in Xcode, it does NOT replace the shortcut text, and it becomes this
`////ABC`
Now in other in build classes/functions in Xcode, autocomplete works in a different way. When we write a wrong spelling and select the autocomplete from Xcode, it replaces the shortcut text. I want to know how to apply this in Custom snippets. I have gone through the edit portion of the snippet but replacing shortcut text is not found. How is this possible? if it is
I am using XCode 8.3, and my OS is macOSSierra.
So I have my app set up with two view controllers. The first one is my initiation screen, where the app starts, and the second is one the user can navigate to. I added the second one later on in my development, but when I went to the right column under the identity inspector, my new Cocoa Touch Class file is not populated for me to select. Now if you ask me to just type it in, I've tried that, it does not seem to connect. I've tested it by printing a simple line in the viewDidLoad() of the new second class when it is loaded in the simulator, but nothing is printed. Any help would be greatly appreciated!! Thanks!
EDIT
Easy fix is:
Select the activity indicator on storyboard and go to identity inspector and copy the object id. as image: ObjectID_ActivityIndicator
Right click the storyboard file which has the view controller you are working at.
Open as > Source Code
Press command + F to find and look for the id you copied previously
Paste this: customClass="yourclassname" customModule="moduleNAme" customModuleProvider="target"(don't change this target word, you can choose desired module from identity inspector if any).
Command + S to save it and again right click on storyboard file > openAs> Interface builder
Now select activity indicator again and go to identity inspector. You will now see it there. You can also change it as per requirement.
Enjoy. I faced this problem today and found no help online. My class and module field were greyed out. Tried this fix and it worked.
Note: Make sure your custom class is accessible and is in app directory i.e it's not highlighted in red color but gives a normal look.
I have seen a problem like this where the solution was to change the "Module" to a specific value, close the storyboard, reopen it and delete the "Module" setting (assuming it was originally blank or restore it to its original value). This happened in project with many targets and their names may have changed.
I'm starting a project but I have another one very similar as base.
I create my new project with storyboard and CoreData, create a new file of NSObject class, and when I start writing in the .h file:
#property (nonanatomic, retain) ns...
nsstring or any type of variable doesn't appear... for example, I start writing ns and it appears:
NS_DURING
NS_ENDHANDLER
NS_HANDLER
NS_VALUERETURN
NS_VOIDRETURN
and the most of code is in black letter, i mean, nothing is coloured as it shoud be normal like purple, blue, etc... the colour that xcode sets... here you can see it:
http://oi61.tinypic.com/359iws6.jpg
P.S: I'm using Xcode 5 Preview 3 and OsX Mavericks. I've never had this problem I think.
Possibly your dot-m (the implementation) file is not a member of the target.
When adding a new file to the project on the bottom of the save dialog there is a Target Membership window . Did you check that box?
To view the target membership and/or to add an existing file to your target open the implementation file. Then open the File Inspector using ⌥+⌘ 1 or View, Utilities, Show File Inspector.
In the File Inspector window halfway down there is the Target Membership. Check the box next to your target.
Syntax highlighting will begin after a short moment, wait for Xcode to finish its indexing.
Try out this: In XCode open Preferences, click on the Text Editing Tab and make sure "Use Escape key to show completion suggestions" is checked.
I get indentation issues when I copy few lines and paste it. Xcode does not copy indentation properly or applies another indentations.
As shown in below images, I copied first function and pasted which is second function. Indentation are reapplied except for first line.
I played with Xcode indentation settings but could not solve it neither do I have any clue why this happens.
Below are 2 indentation settings I tried.
Do anybody see anything wrong in above settings?
In Xcode preferences, Key Bindings tab, redefine ⌘-V to "Paste and Preserve Formatting" and ⌘-option-shift-V to "Paste". Then ⌘-V will do "Paste and Preserve Formatting" which is what you want.
Try turning off Auto-Indentation. That way, Xcode doesn't remove formatting.
That was when i customized indentation in Swift and then get back to Obj-C. Nothing with changing preferences helped. Just fully restart xcode.
With cut and paste, you have to actually tell xcode to indent after the pasting.
⌘ A and then Control I.
The first one select the whole class contents (when the cursor is inside) and the second one indents it based on your indent preferences.
Hope this helps.
I just checked Xcode settings in another mac and made changes to match that and solved the issue. Sorry I don't remember what were they as it has been too long.
I recently downloaded Xcode 5, and it's now my primary IDE. However, I now need to disable Automatic Reference Counting for a single file in my project.
In Xcode 4, I went to the Build Phases tab under my target, and I could double click the on the right side of a row in the Compile Sources section, add -fno-objc-arc to the list of compiler flags, and be off.
In 5, however, the column seems to be unclickable:
So, how do I do this?
Well, I just tried and found that you must had dragged the window to a smaller width. You need to drag it back to show the Compiler Flag column:
To fix the real issue rather than a GUI issue, select the file and press ENTER, then you can add the -fno-objc-arc compiler flag.
You appear to be missing the right-hand column. On my install it looks like this:
Notice the 'Compiler Flags' column to the right of the 'Name' column.
Double-clicking anywhere on the row allows me to type into the flags as long as that column is on screen. Making my window sufficiently thin causes it to be invisible so the first thing I'd try is making your window super-wide, to see whether you can get a flags column.