Tag: xcode

Adding Done and Cancel buttons to an iOS number pad

There are some cases when you may want to have a "Done" or "Cancel" button on an iOs number pad when editing a text field. This doesn't come by default, but is easy to add. See the example snippets below, or check out the code on github. Sample Usage: DoneCancelNumberPadToolbar.h DoneCancelNumberPadToolbar.m Special thanks to [akozl ik](http://www.reddit.com/r/iOSProgramming/comments/ydrzv/adding_done_and_canc el_buttons_to_an_ios_number/c5v4rpt) for the help with delegates.

Adding a Delete Line hotkey in Xcode

When I switched from eclipse to sublime text 2, the first hotkey I moved over was cmd+d to delete a line. I use it pretty heavily.  After using Xcode for a few months it was driving me crazy that it didn't have delete line as an option under hotkeys. Thanks to stackoverflow for the solve. To add a new custom key binding, we have to edit the Key Binding plist file: (close Xcode) Add this text just ABOVE the close of the at the bottom of this file: Note that: This is inside the existing so there is a after…