XCode provides limited suggestions after dot notation - ios

after a dot notation xcode provides some suggestions however it is very limited. For example, in the following picture 1, I have sender.title. I would like xcode to provide suggestions that not only start with title but also contatin the word title in it. in this case, I was looking for sender.currentTitle, but I couldn't see it since xcode only provides suggestions that start with title.

I am Using swift 3.0, xcode8.1 and autocomplete has a good list to get the right option also any time if you can't see autosuggestion you can press esc or control+comma(for list) to get the pop up again, however I am new to swift and love this programming language !!
Since you are using Xcode 6, so it might possible This answer can help you StackoverFlow Answer
-Cheers

Related

Auto fix implement of missing method of protocol with Xcode?

I am not very familiar with Xcode,
Since I think every decent IDE should have a shortcut for auto-fix a template of implemented protocol (such as interface in java) to save some effects of the programmers to just fill in the logic and don't have to type in the method name and parameter stuff.
Such as when we meet this:
And I googled around and some guy said that there should be a fix all in scope thing in the Editor, but seems I can't make that clickable :-(
So, how to do this with xcode? Thanks.
Unfortunately Xcode is fairly behind compared to other IDE's in features for refactoring and such.
The main Xcode version: 8.x, can't do what you wish for. But some of it will be/is available in beta Xcode 9
Xcode may suggest a fix for a compiler error. You can click the errors individually to see the suggested fix(es) and select one.
Alternatively the 'Fix All In Scope' allows you to tell Xcode to select suggested fixes of the current file.

Is there a way to turn off Xcode 8's autocomplete for image names?

Xcode 8 has this new feature that is supposed to suggest image file names when you use UIImage(named:)
In my case it suggests image names even when it doesn't make any sense.
Example:
There is nothing in preferences. I wonder if there is some secret command to disable this part of autocompletion.
No this unfortunately can't be turned off, and nothing states that this is fixed in the Xcode 8.1 Release Notes.
It should either be fixed or you should have the opportunity to turn it off. The functionality is kind of good when it´s used for it´s purpose only, as I describe in this post.
But the issue is that Xcode 8 is inserting images inline in source when it can't possibly make any sense as you mention. For example, if you have a for iteration and type for x in to start a loop and you have any image in the project whose name matches "in" using this syntax.
Annoying issue, that I hope Apple will fix soon, because the feature is good when it´s used for images only.
Update:
Just confirmed that this is still an issue in Xcode 8.1 stable version.
Update:
This functionality remains in Xcode Version 9.0 beta 6 (9M214v)
Update
This seems to be fixed in Xcode 10 now.
It seems to me that the best way to deal with this issue is by using comments (commmand + /). Changing the code to become a comment seems to turn off the autocomplete for image names.
So, you would have basically to switch back and forth between commenting and uncommenting your code (e.g. you find an error, make your code as a comment, fix the error, uncomment your code, check if your changes fixed the issue, and so on.).
Example of the same code with and without being a comment.
Simply update to Xcode 10: the image autocompletion feature has been discontinued:
Code Completion for Swift image literals has been removed in Xcode 10. (38087260)
Source: the Xcode 10 Beta release notes (this note was removed in the final release notes)

Weird Xcode autocomplete

I've updated my Xcode yesterday to version 7.3 and since then I got a really strange autocomplete (marked text, case sensitive etc.):
Is it something of the new version? Can I turn it off and use the classic autocomplete of Xcode?
Thank you!
Yes, it is a new autocomplete in the new Xcode version. It uses fuzzy matching to provide suggestions. I haven't found a way to turn it off, but give it a shot. The old autocomplete is absolutely dreadful. I used to install a Fuzzy Autocomplete plugin to make it work properly.
In the old days (in case of Objective-C, for instance, but it's the same with Swift), if you wanted to implement
- tableView:heightForRowAtIndexPath:
you typed -tableView, saw all the methods starting with tableView:, then you added a colon, and the autocomplete died. Now you can just enter something like -tv:hfrowatinp, and you instantly get your method.
It will take a bit of time getting used to, but it's worth it, trust me.

Is it possible to make Xcode auto complete to act like visual assist?

I am using Xcode 6.1 on Yosemite, writing IOS apps using swift.
For example:
If I type:
myClass.st
I was hoping the editor to show me this:
myClass.SetTitle()
but the reality is not what I had expected.
the editor says no match. In case of visual assist or Sublime Text, "st" mathes "SetTitle"
Sometimes people only remember a few keywords of the long variable name, rather than the full name from the very beginning.
Is is possible to solve this issue by some plugins?
Thank you
I think I have found the answer to this.
The plugin is called
FuzzyAutocompletePlugin
Written by GitHub.com/chemo

“Show Obj-C only” setting is missing in Instruments 6.1

Since my latest update to the Instruments 6.1 I can't find "Show Obj-C only" checkbox anymore. Does somebody know if it has been removed completely or where one can find it?
Please, see attached images.
old Instruments checkBoxes:
new Instruments checkBoxes:
Looking through the Instruments User Guide by Apple you stumble upon many screenshots of the UI. All of them are missing the "show obj-c only" section. They definitely removed the feature from instruments.
One of the reasons may be that according to the Xcode release notes instruments supports swift (Instruments supports Swift, displaying Swift symbols in stack traces) and therefore they would have to either change the title of the feature or add a similar feature for swift. They apparently choose to remove it entirely since almost all of its functionality can be achieved by using the "Hide System Libraries" option and "Data Mining" section.
#Aaron Brager asked about the topic in the apple developer forum as well and received pretty much the same answer.
=> Apple felt like its functionality was redundant and it could/should be removed! Therefore they acted accordingly.
P.S.: as the answerer in the dev forum asks: if you have a use case that got more difficult, feel free to file a bug report.
I've also noticed this and while it's not exactly the same, I use the following toggle in the new interface builder to focus on my personal code:
Toggle Off:
Toggle On:

Resources