There used to be a section on the right side of xib file to select a UI control (e.g. button, checkbox, text area, etc) from menu, and add to xib file. But after upgrading to Xcode 14.1 the option is gone. I can't find it anywhere.
Previously it looked like this:
There's a plus sign in the upper right corner. See screenshot:
Then this should pop up. You can drag and drop what you want onto the storyboard.
Just googled up, the thing is called "Object Library", and the command to open it is:
Command + Shift + L
Thanks Adrian for showing the button in screenshot!
This is a very general question for everyone who uses Xcode 11. I am trying to find the action that will allow me to use the "Embed in button" if you know of any ways please leave a comment below. I have tried Command + Click & Control + Click and neither work or direct me to the action
Version 11.4.1 of XCode
The option to: Embed in Button isn't available anymore in XCode.
Anyway, you can do this instead:
Click the "+" (Library Button)
Click on "Show the views library" and search for Button
Drag and drop the Button wherever you need it
Cut, Paste your code inside of the brachets
1.
2.
3.
4.
I hope this can help you.
While debugging in xcode:
How do you navigate to the current cursor position.
This is really easy in Visual Studio, using the debug button in the top menu.
Something similar must be possible in xcode. But how?
It's also easy in Xcode, extracted from documentation :
"To continue execution to a specific line of code, hold the pointer over the gutter next to the target code line until the continue-to-here icon appears, then click the icon."
Edit :
You can simply click on the latest method presented in the debug bar (the screen show the thread, but you can directly click on the stack) :
From the Xcode guide : http://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Debugging/Debugging.html#//apple_ref/doc/uid/TP40010215-CH3-SW27
this was the answer from the brad larson on this
SO question
If you add two breakpoints, you should be able to debug these exceptions. To do this, go to Run | Show | Breakpoints and create two global breakpoints (I do them globally because they are so useful in all my applications). The first should be named "objc_exception_throw" and its location should be "libobjc.A.dylib". The second should be "-[NSException raise]" and its location should be "CoreFoundation".
Now, if you start debugging your application with breakpoints enabled, it should break on the throw of these exceptions. You should then be able to see the chain of events that led to the exception within the debugger.
now in this answer i want to ask how do i add location mentioned???
I think Brad's answer is pretty clear; hopefully this can help if you're not finding it clear.
In Xcode, from the top menu click on Run > Show > Breakpoints. A new window pops up.
Select "global breakpoints" in the left hand menu. There should be a box on the right under the "Breakpoint" column with the text "Double-Click for symbol". Single-click in this box and type in "objc_exception_throw".
Then, single-click in the space next to "objc_exception_throw" under the "location" column. A box will appear for you to type in the location (in this case, "libobjc.A.dylib"). I've made a screenshot that will hopefully help:
In Xcode 4 this great breakpoint can be added via "+" button on Breakpoints section (⌘ + 6)
in Xcode 6 -- from top menu
Debug > Breakpoints > Create Exception Breakpoint
I would also like to recommend adding the +[NSException raise:format:arguments:] breakpoint and its location should be CoreFoundation.
Is there any way to remove all the breakpoints in Xcode?
Well there's a 3 step way:
Press CMD(⌘)+7 to show all breakpoints.
In Xcode4 press CMD(⌘)+6, in Xcode3 press CMD(⌘)+ALT+B.
Select all breakpoints with CMD(⌘)+A and delete them, like deleting text, with backspace.
There's no step 3 :)
Its very easy to do in new Xcode. Just click on breakpoints Tab then select all then delete.
Xcode 10 Screenshot:
Old Xcode Screenshot:
tap. See attach image for clear reference.
In Xcode, you can also do by right clicking the project name on the breakpoints tab and then you can see the options for deleting all breakpoints including disabling and sharing breakpoints.
In Xcode 4, in the debugger console, type "breakpoint delete" or "br del" for short:
(lldb) br del
About to delete all breakpoints, do you want to do that?: [Y/n] y
All breakpoints removed. (1 breakpoints)
(lldb)
You can't rely on the GUI breakpoint list, since nothing you enter from the command line will show up there.
Other ways:
Select Breakpoints group in Groups and Files tree, click in Detail view, Command-A, Delete
Disclose Breakpoints smartgroup in Groups and Files tree, shift- or command-select breakpoints in outline, press Delete
Run > Console, when app is paused, type "delete breakpoints" and press Return
Xcode 10
The most easiest way is to do ⌘ + y to disable enable breakpoints .
There is another way
go to Xcode project navigations pane
Click on show Breakpoint navigator
Right click on the project file and select disable all break points
In Xcode 9 it's CMD(⌘) + 8 to access all breakpoints, you can also just click here:
Then you can select and delete them.
Additionally, you can customize your Toolbar and put the "Breakpoints" button there. Click this on/off will active/deactivate all breakpoints. While this doesn't remove them, it may be useful if you just don't want them to be hit for a run.
As an addition to mxg 's answer above:
in Xcode 5 it's been changed to CMD(⌘) + 7
For Xcode 5:
In ToolBar, select Navigate -> select Reveal in Project Navigator -> In Navigator area, select Show the Breakpoint Navigator.
Here, You can edit, hide/unhide, share, move the breakpoint for each and every class.
Note: Because of Xcode newbie's, am explained the steps from toolbar to show the Breakpoint Navigator.
For XCode 12:
Press CMD ⌘ + 8
Select All (CMD ⌘ + A)
Right Click and Select "Delete Breakpoints"
For XCode 12.4
Click on Debug in Toolbar
Choose Breakpoints
Then Click on Delete All Breakpoints
That's it!!
CMD(⌘) + a
CMD(⌘) + /
CMD(⌘) + /
In XCode 7 you can just drag a bp into the project view window and an X will appear, release mouse and it will be deleted.