<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Guerratopia</title>
	<atom:link href="http://guerratopia.com/feed" rel="self" type="application/rss+xml" />
	<link>http://guerratopia.com</link>
	<description>Nuestra recompensa se encuentra en el esfuerzo y no en el resultado</description>
	<lastBuildDate>Tue, 07 Feb 2012 03:02:37 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Error opening terminal: xterm-256color</title>
		<link>http://guerratopia.com/error-opening-terminal-xterm-256color</link>
		<comments>http://guerratopia.com/error-opening-terminal-xterm-256color#comments</comments>
		<pubDate>Tue, 07 Feb 2012 03:02:37 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Solución Problemas]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=834</guid>
		<description><![CDATA[Recientemente tuve este problema con Mac OS Lion, pero la solución es muy simple, basta con: Haga clic en  Terminal en la parte superior izquierda de la pantalla Elija Preferences Su tema actual debe ser seleccionado de manera predeterminada en la lista de temas. Haga clic en la pestaña Advanced en la parte &#8230; <a href="http://guerratopia.com/error-opening-terminal-xterm-256color">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recientemente tuve este problema con Mac OS Lion, pero la solución es muy simple, basta con:</p>
<ol>
<li>Haga clic en  <strong>Terminal</strong> en la parte superior izquierda de la pantalla</li>
<li>Elija <strong>Preferences</strong></li>
<li>Su tema actual debe ser seleccionado de manera predeterminada en la lista de temas.</li>
<li>Haga clic en la pestaña <strong>Advanced</strong> en la parte superior derecha del cuadro de diálogo</li>
<li>Bajo Declarar la Terminal como, elegir la opción “<strong>xterm-color</strong>”.</li>
<li><strong>Reinicie la Terminal</strong>, y sera todo.<a href="http://guerratopia.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-7.55.13-PM.png"><img class="aligncenter size-full wp-image-835" title="Screen Shot 2012-02-06 at 7.55.13 PM" src="http://guerratopia.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-7.55.13-PM.png" alt="" width="589" height="532" /></a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/error-opening-terminal-xterm-256color/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling</title>
		<link>http://guerratopia.com/compiling</link>
		<comments>http://guerratopia.com/compiling#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:34:32 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Curiosidades]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=830</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/303/"><img class="aligncenter size-full wp-image-831" title="compiling" src="http://guerratopia.com/wp-content/uploads/2012/02/compiling.png" alt="" width="413" height="360" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/compiling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The bundle is invalid. The key CFBundleVersion in the info.plist must contain a higher version than that of the previously uploaded version.</title>
		<link>http://guerratopia.com/the-bundle-is-invalid-the-key-cfbundleversion-in-the-info-plist-must-contain-a-higher-version-than-that-of-the-previously-uploaded-version</link>
		<comments>http://guerratopia.com/the-bundle-is-invalid-the-key-cfbundleversion-in-the-info-plist-must-contain-a-higher-version-than-that-of-the-previously-uploaded-version#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:51:40 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=826</guid>
		<description><![CDATA[Cuando yo estaba tratando de &#8221;validar&#8221; mi aplicación (usando Xcode) para hacer una actualización de mi aplicación en iTunes Connect, por una razón desconocida que estaba recibiendo este mensaje de error:The key CFBundleVersion in the info.plist must contain a higher version than that of the previously uploaded version. Si tienes el mismo problema, puede resolverlo de &#8230; <a href="http://guerratopia.com/the-bundle-is-invalid-the-key-cfbundleversion-in-the-info-plist-must-contain-a-higher-version-than-that-of-the-previously-uploaded-version">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cuando yo estaba tratando de &#8221;validar&#8221; mi aplicación (usando Xcode) para hacer una actualización de mi aplicación en iTunes Connect, por una razón desconocida que estaba recibiendo este mensaje de error:The key CFBundleVersion in the info.plist must contain a higher version than that of the previously uploaded version.</p>
<p>Si tienes el mismo problema, puede resolverlo de la siguiente manera:</p>
<ol>
<li>Abre el sitio de iTunes Connect, después click en Manage Your Applications &gt;  &#8221;Tu App&#8221; &gt; View Details (boton de la esquina izq.) &gt; Binary Details.</li>
<li>Allí podrás ver  el &#8220;Bundle Version&#8221;, después todo lo que necesitas hacer es actualizar el Bundle Version de tu App.<br />
<a href="http://guerratopia.com/wp-content/uploads/2012/02/BinaryDetails.png"><img class="aligncenter size-full wp-image-828" title="BinaryDetails" src="http://guerratopia.com/wp-content/uploads/2012/02/BinaryDetails.png" alt="" width="971" height="497" /></a></li>
</ol>
<p>Al principio supuse  que el &#8221;Bundle Version&#8221; para fines iTunesConnect era el que se puede ver en &#8220;Version Information&#8221;, pero parece que Apple utilizan datos diferentes para esos fines.</p>
<p>Espero haber sido de ayuda.</p>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/the-bundle-is-invalid-the-key-cfbundleversion-in-the-info-plist-must-contain-a-higher-version-than-that-of-the-previously-uploaded-version/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CFBundleShortVersionString no se actualiza siempre es 1.0 &#124; Appcelerator Titanium</title>
		<link>http://guerratopia.com/cfbundleshortversionstring-no-se-actualiza-siempre-es-1-0-appcelerator-titanium</link>
		<comments>http://guerratopia.com/cfbundleshortversionstring-no-se-actualiza-siempre-es-1-0-appcelerator-titanium#comments</comments>
		<pubDate>Mon, 30 Jan 2012 18:24:50 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Appcelerator Titanium]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=822</guid>
		<description><![CDATA[Usando iPhone SDK 1.8.x (Appcelerator Titanium) y por alguna razón desconocida el valor de CFBundleShortVersionString siempre se queda en 1,0 y eso me estaba deteniendo para actualizar mi aplicación,  pero despues me tope con esta solución que resolver mi problema. Cuando hagas un build de tu aplicación dentro del directorio build-&#62;iphone  esta el &#8230; <a href="http://guerratopia.com/cfbundleshortversionstring-no-se-actualiza-siempre-es-1-0-appcelerator-titanium">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Usando iPhone SDK 1.8.x (Appcelerator Titanium) y por alguna razón desconocida el valor de CFBundleShortVersionString siempre se queda en 1,0 y eso me estaba deteniendo para actualizar mi aplicación,  pero despues me tope con esta solución que resolver mi problema.</p>
<ol>
<li>Cuando hagas un build de tu aplicación dentro del directorio build-&gt;iphone  esta el archivo info.plist, copialo a el directorio raíz del proyecto (donde reside Tiapp.xml).</li>
<li>Edita el info.plist que acaba de copiar en el directorio raíz, cambiando manualmente el valor de CFBundleShortVersionString (paracualquier versión que necesitas).</li>
<li>Guarde el archivo (el que esta en el directorio raíz) y dale build de nuevo al proyecto, el info.plist generado automáticamente tomará los datos en el archivo modificado.</li>
</ol>
<p><strong>Fuente: <a href="http://developer.appcelerator.com/question/129052/cfbundleshortversionstring-does-not-update">Q&amp;A Appcelerator</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/cfbundleshortversionstring-no-se-actualiza-siempre-es-1-0-appcelerator-titanium/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Categories: Objective &#8211; C</title>
		<link>http://guerratopia.com/categories-objective-c</link>
		<comments>http://guerratopia.com/categories-objective-c#comments</comments>
		<pubDate>Mon, 29 Aug 2011 21:02:12 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=811</guid>
		<description><![CDATA[Las categorías son una de las características más útiles de Objective-C. En esencia, una categoría le permite añadir métodos a una clase existente, sin que la subclasificación o necesidad de conocer cualquiera de los detalles de cómo se implementa. Una &#8230; <a href="http://guerratopia.com/categories-objective-c">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Las categorías son una de las características más útiles de Objective-C. En esencia, una categoría le permite añadir métodos a una clase existente, sin que la subclasificación o necesidad de conocer cualquiera de los detalles de cómo se implementa.</p>
<p>Una categoría recoge las implementaciones de método en archivos separados. El programador puede colocar grupos de métodos relacionados en una categoría para que sean más legibles. En otras palabras, si deseas agregar un método a todas las instancias de NSString en tu aplicación, solo hay añadir una nueva categoría. No hay necesidad de una subclase personalizada.</p>
<p>Por ejemplo, voy a añadir dos métodos para un NSString. uno para determinar si el contenido es una URL y la otra para añadir un método de reverseString.</p>
<p>Se vería así:</p>
<ol>
<ol>
<li>Crear un nuevo proyecto de XCode un &#8220;Command Line Tool&#8221;. Lo llamaré <em><em>ExtendsNSString</em></em><a href="http://guerratopia.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-29-at-12.52.32-PM.png"><img title="Screen Shot 2011-08-29 at 12.52.32 PM" src="http://guerratopia.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-29-at-12.52.32-PM.png" alt="" width="503" height="337" /></a></li>
<li>A continuación, cree una nueva clase Objective-C (lo voy a llamar a <em> NSString_Extend ). Elimine todo el código en el archivo de cabecera (NSString_Extend.h) y ponemos el siguiente código:<br />
</em></p>
<pre name="code" class="cpp">#import &lt;Cocoa/Cocoa.h&gt;    

@interface NSString (Extends)
- (BOOL) isURL;
- (NSString *)reverseString;
@end</pre>
<p>es muy similar a una declaración de clase. La diferencia es que no hay una súper clase, y hay un nombre para la categoría entre paréntesis, el nombre puede ser el que quieras.</li>
<li>Ahora elimine todo el código en el archivo de implementación (<strong><strong> NSString_Extend.m</strong></strong>) y ponemos el siguiente código:
<pre name="code" class="cpp">#import "NSString_Extend.h"

@implementation NSString (Extends)

- (BOOL) isURL
{
    if ( [self hasPrefix:@"http://"] )
        return YES;
    else
        return NO;
}

- (NSString *) reverseString
{
    NSUInteger len = [self length];
    NSMutableString *rtr=[NSMutableString stringWithCapacity:len];
    //        unichar buf[1];

    while (len &gt; (NSUInteger)0) {
        unichar uch = [self characterAtIndex:--len];
        [rtr appendString:[NSString stringWithCharacters:&amp;uch length:1]];
    }
    return rtr;
}
@end</pre>
<p>A diferencia de las subclases, las categorías no se puede agregar variables de instancia. Puede, sin embargo, utilizar categorías para sustituir métodos existentes en las clases, pero debes hacerlo con mucho cuidado.</li>
<li>Ahora usted puede utilizar estos métodos en cualquier NSString, vamos a cambiar el <strong><strong> main.m</strong></strong>, que se verá algo como lo siguiente:
<pre name="code" class="cpp">   #import &lt;Foundation/Foundation.h&gt;
#import "NSString_Extend.h"
int main (int argc, const char * argv[])
{

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

// insert code here...
NSString* string1 = @"http://pixar.com/";
NSString* string2 = @"Pixar";

if ( [string1 isURL] )
NSLog (@"string1 is a URL");
else
NSLog (@"string1 is not a URL");

if ( [string2 isURL] )
NSLog (@"string2 is a URL");
else
NSLog (@"string2 is not a URL");

NSString *test = [@"!A string to be reverted!" reverseString];

NSLog(@"%@", test);

[pool drain];
return 0;
}</pre>
<p>Cuando se realizan cambios en una clase con una categoría, esta afecta a todas las instancias de esa clase en toda la aplicación.</li>
</ol>
</ol>
<p>&nbsp;</p>
<p>Puedes descargar el codigo de este tutorial <a href="https://github.com/Guerrix/CategoriesObjectiveC" target="_blank">Aqui</a><br />
Fuente:</p>
<ul>
<li><a href="http://cocoadevcentral.com/d/learn_objectivec/" target="_blank">Learn Objective-C: CocoaDevCentral</a></li>
<li><a href="http://en.wikipedia.org/wiki/Objective-C#Categories" target="_blank">Wikipedia: Objective-C Categories</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/categories-objective-c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The only way to do great work is to love what you do</title>
		<link>http://guerratopia.com/the-only-way-to-do-great-work-is-to-love-what-you-do</link>
		<comments>http://guerratopia.com/the-only-way-to-do-great-work-is-to-love-what-you-do#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:05:43 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=810</guid>
		<description><![CDATA[Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love &#8230; <a href="http://guerratopia.com/the-only-way-to-do-great-work-is-to-love-what-you-do">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking, and don’t settle. As with all matters of the heart, you’ll know when you find it.</p>
<p>&nbsp;</p>
<p style="text-align: right;">Steve Jobs</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/the-only-way-to-do-great-work-is-to-love-what-you-do/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singleton en Objective-c</title>
		<link>http://guerratopia.com/singleton-en-objective-c</link>
		<comments>http://guerratopia.com/singleton-en-objective-c#comments</comments>
		<pubDate>Tue, 24 May 2011 20:31:32 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=760</guid>
		<description><![CDATA[Uno de los patrones de diseño mas utilizados es el singleton. El singleton es usado para instanciar solo una vez una clase. Encontre un template para un singleton en objective-c el cual quiero compartir con ustedes. Pero para este caso &#8230; <a href="http://guerratopia.com/singleton-en-objective-c">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Uno de los patrones de diseño mas utilizados es el singleton. El singleton es usado para instanciar solo una vez una clase. Encontre un template para un singleton en objective-c el cual quiero compartir con ustedes.</p>
<p>Pero para este caso usare un singleton para guardar/retener un valor de tipo NSString</p>
<p>A continuación pongo el código para el singleton.</p>
<p><strong>MySingleton.h</strong></p>
<pre name="code" class="cpp">#import &lt;Foundation/Foundation.h&gt;

@interface MySingleton : NSObject {

    NSString *stringValue;

}

+ (MySingleton *)sharedMySingleton;

- (NSString *)stringValue;
- (void)setStringValue:(NSString *)value;

@end</pre>
<p><strong>MySingleton.m</strong></p>
<pre name="code" class="cpp">#import "MySingleton.h"

@implementation MySingleton

static MySingleton* _sharedMySingleton = nil;

+(MySingleton*)sharedMySingleton
{
	@synchronized([MySingleton class])
	{
		if (!_sharedMySingleton)
			[[self alloc] init];

		return _sharedMySingleton;
	}

	return nil;
}

+(id)alloc
{
	@synchronized([MySingleton class])
	{
		NSAssert(_sharedMySingleton == nil, @"Attempted to allocate a second instance of a singleton.");
		_sharedMySingleton = [super alloc];
		return _sharedMySingleton;
	}

	return nil;
}

-(id)init {
	self = [super init];
	if (self != nil) {
		// initialize stuff here
        stringValue = nil;
	}

	return self;
}

- (NSString *)stringValue{
    return stringValue;
}
- (void)setStringValue:(NSString *)value{
    stringValue = value;
}

@end</pre>
<p>Si quieres Guardar(Set) el stringValue, usamos lo siguiente:</p>
<pre name="code" class="cpp">[[MySingleton sharedMySingleton] setStringValue:@"Hello World"];</pre>
<p>Y  si quieres obtener(Get) el stringValue, usamos lo siguiente:</p>
<pre name="code" class="cpp">[[MySingleton sharedMySingleton] stringValue];</pre>
<p><strong>Puedes descargar una copia de un código funcional de <a href="https://github.com/Guerrix/SingletonInObjectiveC">github</a></strong></p>
<p>Fuente del Post : <a href="http://getsetgames.com/2009/08/30/the-objective-c-singleton/">getsetgames</a></p>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/singleton-en-objective-c/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Como Guardar, Cargar o Borrar Imagenes de iPhone/iPad documents directory</title>
		<link>http://guerratopia.com/how-to-saveload-or-remove-images-in-iphoneipad-documents-directory</link>
		<comments>http://guerratopia.com/how-to-saveload-or-remove-images-in-iphoneipad-documents-directory#comments</comments>
		<pubDate>Sat, 07 May 2011 19:00:20 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[iOS @en]]></category>
		<category><![CDATA[iPhone @en]]></category>
		<category><![CDATA[Objective-C @en]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=748</guid>
		<description><![CDATA[Si en tu proyecto tienes la necesidad de cargar imagenes desde la web, sugiero que salves las imagenes dentro documents directory del tu iPhone/iPad , esto para optimizar la aplicacion y el performance. Para guardar, cargar o eliminar una imagen &#8230; <a href="http://guerratopia.com/how-to-saveload-or-remove-images-in-iphoneipad-documents-directory">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Si en tu proyecto tienes la necesidad de cargar imagenes desde la web, sugiero que salves las imagenes dentro <em>documents directory</em> del tu iPhone/iPad , esto para optimizar la aplicacion y el performance.</p>
<p>Para guardar, cargar o eliminar una imagen del directorio de documentos de tu app, lo hacemos con 3 simples metodos.</p>
<p><strong>Para Guardar una imagen</strong></p>
<pre name="code" class="cpp">
- (void)saveImage:(UIImage*)image:(NSString*)imageName {

NSData *imageData = UIImagePNGRepresentation(image);//convert image into .png format.
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png", imageName]];

[fileManager createFileAtPath:fullPath contents:imageData attributes:nil];
NSLog(@"image saved");
}</pre>
<p><strong>Para Eliminar una imagen</strong></p>
<pre name="code" class="cpp">
- (void)removeImage:(NSString*)fileName {

NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png", fileName]];

[fileManager removeItemAtPath: fullPath error:NULL];
NSLog(@"image removed");

}
</pre>
<p><strong>Para Cargar una imagen</strong></p>
<pre name="code" class="cpp">
- (UIImage*)loadImage:(NSString*)imageName {

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithFormat:@"%@.png", imageName]];

return [UIImage imageWithContentsOfFile:fullPath];

}</pre>
<p>Ahora, para salvar cualquier imagen solo llamas al metodo algo asi;</p>
<pre name="code" class="cpp">
[self saveImage: theUIImage: @"UIImageName"];
</pre>
<p><strong>o para cargar:</strong></p>
<pre name="code" class="cpp">myUIImage = [self loadImage: @"UIImageName"];</pre>
<p><strong>o para eliminar:</strong></p>
<pre name="code" class="cpp">[self removeImage: @"UIImageName"];</pre>
<p><strong>Obtener una imagen desde una url:</strong></p>
<pre name="code" class="cpp">NSString *urlName= @"http://theURL/image";
NSURL *url = [NSURL URLWithString:urlName];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];</pre>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/how-to-saveload-or-remove-images-in-iphoneipad-documents-directory/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Incorporar Youtube Video en iPad</title>
		<link>http://guerratopia.com/incorporar-youtube-video-en-ipad</link>
		<comments>http://guerratopia.com/incorporar-youtube-video-en-ipad#comments</comments>
		<pubDate>Fri, 29 Apr 2011 22:48:29 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=736</guid>
		<description><![CDATA[Aqui les pongo un sencillo tutorial para poder embeber un video de YouTube en tu aplicación de iPad, tambien funciona para iPhone. Nota:  El simulador de iPad/iPhone no permite reproducciones en linea, por el funcionamiento solo sera visible en un dispositivo real :S. Creamos &#8230; <a href="http://guerratopia.com/incorporar-youtube-video-en-ipad">Continue reading <span>&#8594;</span></a> <a href="http://guerratopia.com/incorporar-youtube-video-en-ipad">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here I put a small tutorial for embedded a youtube video on iPad also works on iPhone.</p>
<p><strong>Note: The iPad/iPhone simulator does not allow online reproduction, the video will only be visible in a real device .</strong></p>
<ol>
<li>First we create a <strong>View-based Application</strong> project.<img class="aligncenter" src="http://guerratopia.com/wp-content/uploads/2011/04/Screen-shot-2011-04-29-at-2.19.57-PM.png" alt="" width="512" height="344" /></li>
<li>I will name it EmbeddedVideo, you can name it whatever you like.<img class="aligncenter" src="http://guerratopia.com/wp-content/uploads/2011/04/Screen-shot-2011-04-29-at-2.20.43-PM.png" alt="" width="511" height="344" /></li>
<li>Open the <strong>EmbeddedVideoViewController.xib</strong> and added a UIWebView(drag and drop).
<p style="text-align: center;"><img class="aligncenter" src="http://guerratopia.com/wp-content/uploads/2011/04/Screen-shot-2011-04-29-at-2.32.00-PM.png" alt="" width="501" height="295" /></p>
</li>
<li> Then in <strong>EmbeddedVideoViewController.h</strong> create an IBOutlet for ourUIWebView, leaving something like this:
<pre name="code" class="cpp">@interface EmbeddedVideoViewController : UIViewController {
   UIWebView *webVideo;
}

@property (nonatomic, retain) IBOutlet UIWebView *webVideo;

@end</pre>
</li>
<li> We connect the IBOutlet with UIWebView, open the  <strong>EmbeddedVideoViewController.xib</strong> and  in File&#8217;s Owner in the Outlets section select/drag on our UIWebView:<img class="aligncenter" src="http://guerratopia.com/wp-content/uploads/2011/04/Screen-shot-2011-04-29-at-3.23.39-PM.png" alt="" width="552" height="413" /></li>
<li> We opened in <strong>EmbeddedVideoViewController.m</strong> within <strong>viewDidLoad</strong> method (if commented, uncomment it) add a few lines of code, something like this:
<pre name="code" class="cpp">- (void)viewDidLoad
{
       [super viewDidLoad];
       NSString *videoURL = @"http://www.youtube.com/watch?v=JOddp-nlNvQ";
       NSString *htmlString =[[NSString alloc] initWithFormat:@"<span id="\"> </span>",videoURL];
       [webVideo setAllowsInlineMediaPlayback:YES];
       [webVideo loadHTMLString:htmlString baseURL:nil];
}</pre>
</li>
<li>
<div dir="ltr">After that compile and run on our device and we&#8217;ll see something like this</div>
<p style="text-align: center;"><img class="aligncenter" src="http://guerratopia.com/wp-content/uploads/2011/04/IMG_00561.png" alt="" width="502" height="375" /></p>
</li>
</ol>
<div dir="ltr">I hope this will be useful and you can download the code from  <a href="https://github.com/Guerrix/YoutubeVideoOniPad" target="_blank">here</a></div>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/incorporar-youtube-video-en-ipad/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Encriptar string con SHA1 en iPhone/iPad (obective-c)</title>
		<link>http://guerratopia.com/encriptar-string-con-sha1-en-iphoneipad-obective-c</link>
		<comments>http://guerratopia.com/encriptar-string-con-sha1-en-iphoneipad-obective-c#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:47:17 +0000</pubDate>
		<dc:creator>Guerrix</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://guerratopia.com/?p=731</guid>
		<description><![CDATA[Navegando por internet encontre el siguiente codigo que permite encriptar un string usando SHA1. Primero necesitamos incluir la libreria de CommonCrypto para esto agregamos la siguiente linea: #import &#60;CommonCrypto/CommonDigest.h&#62; y despues agregamos el siguiente metodo a nuestro codigo: -(NSString*) digest:(NSString*)input { &#8230; <a href="http://guerratopia.com/encriptar-string-con-sha1-en-iphoneipad-obective-c">Continue reading <span>&#8594;</span></a> <a href="http://guerratopia.com/encriptar-string-con-sha1-en-iphoneipad-obective-c">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Navegando por internet encontre el siguiente codigo que permite encriptar un string usando SHA1.</p>
<p>Primero necesitamos incluir la libreria de CommonCrypto para esto agregamos la siguiente linea:</p>
<pre name="code" class="cpp"> #import &lt;CommonCrypto/CommonDigest.h&gt;</pre>
<p>y despues agregamos el siguiente metodo a nuestro codigo:</p>
<pre name="code" class="cpp">-(NSString*) digest:(NSString*)input
{

    NSData *data = [input dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
    uint8_t digest[CC_SHA1_DIGEST_LENGTH];
    CC_SHA1(data.bytes, data.length, digest);
    NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];

    for(int i = 0; i &lt; CC_SHA1_DIGEST_LENGTH; i++)
        [output appendFormat:@"%02x", digest[i]];

    return output;

}</pre>
<p>El codigo anterior recibe un string de parametro y regresa el mismo string pero encriptado con SHA1</p>
<p>Pueden descargar un ejemplo funcional para iphone de <a href="https://github.com/Guerrix/SHA1Crypto">gitHub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://guerratopia.com/encriptar-string-con-sha1-en-iphoneipad-obective-c/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

