Sava Data & Image Using NSUserDefaults

To save data NSString *savestring = text1.text; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:savestring forKey:@”savedstring”]; [defaults synchronize]; To load data NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *loadstring = [defaults objectForKey:@”savedstring”]; [label1 setText:loadstring]; To save image using NSUserDefaults, In ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController { IBOutlet UIImageView *containedimage; IBOutlet UIImageView *newimage; } – (IBAction)load:(id)sender; – (IBAction)savebutton:(id)sender; @end In ViewController.m #import “ViewController.h” @interface ViewController () @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a…

Continue reading »

Java Features

SIMPLE You will find java easier and simple if you are aware of object-oriented language, especially C++. Object-Oriented Java has no global functions. All functions are invoked through an object. Distributed Java facilitates the building of distributed applications by a collection of classes for use in networking application. Java can easily access a remote server using java libraries such as URL and support other protocols such as HTTP, FTP, and classes for creating socket-level connections. Interpreted Once java interpreter is ported to a specific machine…

Continue reading »