This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/a/23119866/1379492 | |
- (void)prepareForReuse | |
{ | |
[super prepareForReuse]; | |
self.textView.editable = YES; | |
self.textView.editable = NO; | |
self.textView.text = nil; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set a watchpoint on a variable when it is written to. | |
(lldb) watchpoint set variable -w write global_var | |
(lldb) watch set var -w write global_var | |
(gdb) watch global_var | |
Set a watchpoint on a memory location when it is written into. The size of the region to watch for defaults to the pointer size if no '-x byte_size' is specified. This command takes raw input, evaluated as an expression returning an unsigned integer pointing to the start of the region, after the '--' option terminator. | |
(lldb) watchpoint set expression -w write -- my_ptr | |
(lldb) watch set exp -w write -- my_ptr | |
(gdb) watch -location g_char_ptr | |
Set a condition on a watchpoint. | |
(lldb) watch set var -w write global |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)projectDirectoryPath | |
{ | |
NSWindowController *currentWindowController = [[NSApp mainWindow] windowController]; | |
id document = [currentWindowController document]; | |
if (currentWindowController && [document isKindOfClass:NSClassFromString(@"IDEWorkspaceDocument")]) { | |
NSURL *workspaceDirectoryURL = [[[document valueForKeyPath:@"_workspace.representingFilePath.fileURL"] URLByDeletingLastPathComponent] filePathURL]; | |
if(workspaceDirectoryURL) { | |
return [workspaceDirectoryURL path]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\LaunchServices.framework/Versions/A/Support/\ | |
lsregister -kill -r -domain local -domain user | |
$ killall Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BETTestSemaphor.h | |
// TwitterClient | |
// | |
// Created by Rafael Aguilar Martín on 11/11/12. | |
// Copyright (c) 2012 Rafael Aguilar Martín. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p [(CALayer *)[[[[UIApplication sharedApplication] windows] objectAtIndex:0] layer] setSpeed:.1f] |
##Appirater
Appirater creo que es la librería open source más utilizada en Objective-C para recordar al usuario que si le gusta nuestra app que la vote.
###Configuración
Los usuarios tendrán que tener la misma versión para que surta efecto. Se puede configurar el número de días que han pasado de la última vez que se mostró el aviso.
@see http://lifehacker.com/how-to-create-an-os-x-mavericks-usb-installation-drive-1450280026
- Download OS X Mavericks from the Mac App Store, if you haven't already. If it tries to start the installation, just close it.
- Insert your USB drive (you'll need one that's 8GB or larger) and open Disk Utility.
- Select your drive in the sidebar and go to the Erase tab. Format the drive as "Mac OS Extended (Journaled)" and name the drive "Untitled." (Note: if you already have a drive or partition named "Untitled" connected to your computer, name it something else and change the corresponding variable in step 5's terminal command, or you might experience data loss!).
- Click the Erase button and wait for Disk Utility to finish.
- Close Disk Utility and open up a Terminal window. Copy and paste the command into the Terminal.
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ defaults write com.apple.finder AppleShowAllFiles -boolean true; | |
$ killall Finder |
NewerOlder