how to know when text is pasted into UITextView

Here is what i use to detect paste events in UITextView: // Set this class to be the delegate of the UITextView. Now when a user will paste a text in that textview, this delegate will be called. -(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { // Here we check if the replacement text is equal to … Read more

header search path in XCode 4

Click on the project in the file navigator on the left. Then click on the project or target in the editor that appears. Click on “Build Settings”, then change from “Basic” to “All”. Its under search paths.

x86 Assembly on a Mac

After installing any version of Xcode targeting Intel-based Macs, you should be able to write assembly code. Xcode is a suite of tools, only one of which is the IDE, so you don’t have to use it if you don’t want to. (That said, if there are specific things you find clunky, please file a … Read more

Codesign of Dropbox API fails in Xcode 4.6.3: “code object is not signed at all”

I think I may have figured this one out. I’ve been running Xcode 4.6.3 on OS X Mavericks, under the impression that any build-specific tools were bundled in the Xcode application. But, it seems codesign is in /usr/bin. Whether it’s put there by one of the Xcode installers or comes with a vanilla system install, … Read more

How can I use the legacy build system with Xcode 10’s `xcodebuild`?

There is an (as of yet undocumented) flag in xcodebuild: -UseModernBuildSystem=<value>. The value can be either 0 or NO to use the legacy (“original”) build system, or 1 or YES to use the new build system. For example: xcodebuild -workspace Foo.xcworkspace -scheme Bar -configuration Release -archivePath /path/to/Foo.xcarchive clean archive -UseModernBuildSystem=NO (-UseNewBuildSystem=<value> seems to work as … Read more

How to fully remove Xcode 4

I use this command: sudo /Developer/Library/uninstall-devtools –mode=all Edit (1 year later): If you’ve downloaded Xcode from the App Store, it’s self-contained, as @mediaslave suggests. You can just drag it to the trash or use AppZapper (or a similar utility) to remove the developer tools. If you’re looking to update it, you can also do that … Read more