How to Disable ARC from XCode Project

To disable ARC completely from an XCode project follow the steps below – Select Project Select Targets From the Right Panel, Select Build Settings Search for “Automatic Reference Counting” Locate Apple LLVM compiler x.x – Language and Objective-C Automatic Reference […]

Save and Load UIImage in Documents Directory on iPhone – XCode iOS

The following function saves UIImage in test.png file in the user Document folder: 12345678910111213- (void)saveImage: (UIImage*)image { if (image != nil) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString* path = [documentsDirectory stringByAppendingPathComponent: [NSString stringWithString: […]

How to Create Thumbnail of UIImage – XCode iOS

Use the following Code to Create Thumbnail of UIImage Object – 123456UIImage *originalImage = …; CGSize destinationSize = …; UIGraphicsBeginImageContext(destinationSize); [originalImage drawInRect:CGRectMake(0,0,destinationSize.width,destinationSize.height)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); Replace the originalImage object with your original image of which you want to […]