Category Archives: iPhone

IPhone Basic Memory management

If you’re writing an application for Mac OS X, you have the option to enable garbage collection. In general, this means that you don’t have to think about memory management until you get to more complex cases.

However, you may not always be working with an environment that supports garbage collection. In that case, you need to know a few basic concepts.

If you create an object using the manual alloc style, you need to release the object later. You should not manually release an autoreleased object because your application will crash if you do.

Here are two examples:

// string1 will be released automatically NSString* string1 = [NSString string]; // must release this when done NSString* string2 = [[NSString alloc] init]; [string2 release];

Simple Code Set UItextField offset :

txtEmail.layer.sublayerTransform = CATransform3DMakeTranslation(10, 0, 0);
txtPassword.layer.sublayerTransform = CATransform3DMakeTranslation(10, 0, 0);

Simple way Set Placeholder Color



Happy Programming :-)

Skip to toolbar