Question: I want to create virtual hosts for my project in zend framework. I have frontend and backend (admin) functionality. I created the virtual host for my frontend functionality with necessary configuration and it running properly.

Example: In /etc/apache2/sites-available I created the file roomstays and my code is in **var/www** folder.

```
<VirtualHost *:80>    
DocumentRoot "/var/www/roomstays/public"    
ServerName localhost

#This should be omitted in the production environment
SetEnv APPLICATION_ENV development

<Directory "/var/www/roomstays/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>    
</VirtualHost>

```

And it running properly with localhost.

Now I have admin i.e.backend code and as previous one I want to run this code. I put my newer code into same **var/www** directory with named roomstaysback. My question is how to create virtual host for this backend code. I want to run both frontend and backend side code. 

Please give me any solution I am completely new in it thanks.....

Answer: 
UIImages should be saved by creating a PNG or JPEG representation, then writing that NSData block out as you see fit. See [UIImagePNGRepresentation](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIImagePNGRepresentation).

UIButtons should be serialized/deserialized using the [NSCoding](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html) protocol. Archives can take care of this for you.

NSData and UIButtons both support NSCoding, so I would recommend archiving instead of NSUserDefaults. See NSCoding for the beginning of that rabbit hole.
You cans use plist or coreData.As you used NSUserDefaults , that means data is quite small so plist will be a good idea.Both are apple's so quite effiecient .If data gets really large you can use sqlite.