How to safely send @optional protocol messages that might not be implemented

On 24/10/2011, in Bloques, Cocoa OSX, Cocoa Touch, English, Objective C, by frr149

@optional methods in Objective C protocols Objective C 2.0 added support for @optional methods in protocols. Whatever class conforms to the protocol, it won’t be forced to implement “empty” methods if it doesn’t need them. This is certainly handy for the client conforming to the protocol. Unfortunately, it makes life miserable on the other side. [...]

Tagged with:  

Automatizar el envío de mensajes en serie con Bloques en Cocoa

On 23/08/2011, in Bloques, Cocoa OSX, Cocoa Touch, Objective C, by frr149

Bloques en Cocoa ¿Cómo representar conjuntos de acciones que tienen que ser llevadas a cabo en serie? Es relativamente común tener dos mensajes que se tienen que enviar en serie a un objeto. Especialmente cuando se manejan recursos limitados, como manejadores de ficheros, memoria, conexiones a la red, “sockets” y demás. Por ejemplo, cuando se [...]

Tagged with:  

Bloques y Multitarea con Objective C, Cocoa y Grand Central Dispatch (GCD)

On 18/04/2011, in Cocoa OSX, Cocoa Touch, by FRR

Grand Central Dispatch GCD y uso de bloques para multitarea Esta aplicación con Grand Central Dispatch GCD quizás sea la más común e importante de los bloques en Cocoa y Cocoa Touch. Grand Central Dispatch Grand Central Dispatch GCD es una API C para multitarea usando hebras. De cara al usuario es muy sencilla: simplemente pones bloques [...]

Tagged with: