Authorminakshi.bhosale

How to merge two UIImages programmatically?

H

Hi all, While developing an application I came to this issue. I was suppose to merge 2 images programmatically. I googled a little bit and found a function, then I modified it as follows for my requirements -(UIImage *) mergeTwoImages: (UIImage *)bottomImage : (UIImage *)upperImage : (CGRect)rect { UIImage *image = upperImage; CGSize newSize = CGSizeMake(bottomImage.size.width, bottomImage.size...

iPhone Application Lifecycle

i

I just went through one presentation for iPhone application. So this post to share what I understood. First of all the main focus is how actually iPhone applications work. When user touches the icon of the application main() gets called by the system. main() creates the autoreleasepool and starts the application with UIApplicationMain object. UIApplicationMain creates the instance of the...

How to resize image programmatically in iPhone

H

Hello friends, many times we need to resize the UIImage runtime according to the need of application.  Here is the function which changes the size of the image and returns a new resized image – (UIImage *)reSizeTheImage:(UIImage *)image convertToSize:(CGSize)size { UIGraphicsBeginImageContext(size); [image drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage *destImage =...

Servlet Lifecycle

S

Hi friends,  in this post we will take an overview of servlet lifecycle. First of all lets just know what is  servlet? Servlet is a java program which runs on server side. Servlet interacts with the client via request-response. It is nothing but HTML code embedded into java code. When any servlet get called container first checks that whether the object of requested servlet is already exists, if...

How to pick music file from music library in iPhone application

H

Like UIImagePickerView to pick image from image gallery we can also pick up any music file from the music gallery of the device and can use it in our application with the help of MPMediaPickerController. For that you need to add AVFoundation framework in your application. also to play the picked file we need to add MediaPlayer framework. and to use them just import them in respective view...

Conversion of NSString to NSDate and NSDate to NSString

C

  Here is the way to convert NSDate to NSString in objective C Conversion of NSDate to NSString : NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@”yyyy-dd-MMM”]; NSString *dateString = [dateFormat stringFromDate:today]; NSLog(@”date: %@”, dateString); [dateFormat release]; Note that today should be your NSDate object which you...

NSUserDefaults to save and retrieve the data in iPhone

N

In many applications we need to save the state of the application, in that case we can use NSUserDefaults. Lets start with saving the data into NSUserDefaults. We can save small amount of data in NSUserDefaults such as username, high scrore, etc. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:@”username” forKey:@”UserName”]; This is...

Java : Object oriented programming language (Part – 1)

J

Java is a programming language developed by James Gosling at Sun Microsystems. It is an object oriented programming language. Now, what is mean by ‘Object oriented’ ? In object oriented programming, everything is in the form of object. Objects are the fundamental units in object oriented language, which are having their own behavior, specific purpose. Syntax of Java is just like C++...

How to add an icon to your iPhone application?

H

In this post we will learn how to add icon file to iphone application. First you must have icon file 57 x 57 pixels in png format. Once your icon is ready in 57 x 57 pixels and named Icon.png, right click the resources folder and add the Icon.png to resources and do not forget to check the  ‘Copy items into Destination’s folder’ box. Then in Resources folder , find...

Category