<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8958307664040260034</id><updated>2024-10-05T10:17:30.899+06:00</updated><category term="ios"/><category term="iphone"/><category term="jerk animation"/><category term="jerk screen"/><category term="jerking effects"/><category term="rotating image"/><category term="shake animation"/><category term="shake screen"/><category term="shaking effects"/><category term="slider button"/><category term="validation"/><category term="vibrate device"/><category term="vibrate iphone"/><category term="vibrate iphone device"/><category term="vibrate iphone in app"/><category term="action sheet"/><category term="count down"/><category term="count down timer"/><category term="custom alert"/><category term="custom tabbar"/><category term="custom tabbarcontroller"/><category term="elapsed timer"/><category term="email address validation"/><category term="email validation"/><category term="expand sliding area"/><category term="extend thumb of a slider"/><category term="get ip address"/><category term="getting image from album"/><category term="how to rotate an image"/><category term="image in pickerview"/><category term="image rotation"/><category term="in-app sms"/><category term="ip address"/><category term="iphone unlock button"/><category term="ipod access"/><category term="ipod music player"/><category term="limit character in text field"/><category term="mobile number validation"/><category term="more sensitive slider"/><category term="music player"/><category term="music player access"/><category term="phone number validation"/><category term="remaining timer"/><category term="responsive slider"/><category term="retrieve ip address"/><category term="rotate with touch"/><category term="scale and rotate through 2 finger seipe"/><category term="scale with touch"/><category term="scaling image"/><category term="sending sms"/><category term="slide to unlock"/><category term="sliding area extend"/><category term="sms"/><category term="sms through app"/><category term="tabbar"/><category term="tabbarController"/><category term="telephone number validation"/><category term="timer"/><category term="using custom view in picker view"/><category term="validating textfield"/><title type='text'>Erfan&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-32539632679426881</id><published>2012-09-07T15:45:00.001+06:00</published><updated>2012-09-07T15:59:15.153+06:00</updated><title type='text'></title><content type='html'>How to integrate new Facebook SDK in an iOS application (Basic log in functionality) &lt;br /&gt;
&lt;br /&gt;
New Facebook SDK in iOS is a great built-in feature for the iOS apps developer. &lt;br /&gt;
&lt;br /&gt;
Add this Framework header in your AppDelegate.h file (don&#39;t forget to add the Facebook framework).&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;#import &quot;FacebookSDK/FacebookSDK.h&quot; // Please replace the double quote (&quot;) with (&#39;&amp;lt;&#39; and &#39;&amp;gt;&#39;)&lt;facebooksdk acebooksdk.h=&quot;acebooksdk.h&quot;&gt;&lt;/facebooksdk&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
Add this line to your AppDelegate.h file&lt;br /&gt;
&lt;br /&gt;
extern NSString *const FBSessionStateChangedNotification; &lt;br /&gt;
&lt;br /&gt;
Add this method declaration in your AppDelegate.h file&lt;br /&gt;
&lt;br /&gt;
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI;&lt;br /&gt;
&lt;br /&gt;
Add these codes in your AppDelegate.m file&lt;br /&gt;
&lt;br /&gt;
NSString *const FBSessionStateChangedNotification =&lt;br /&gt;
@&quot;com.yourCompany.yourAppName:FBSessionStateChangedNotification&quot;;&lt;br /&gt;
&lt;br /&gt;
- (BOOL)application:(UIApplication *)application &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; openURL:(NSURL *)url&lt;br /&gt;
&amp;nbsp; sourceApplication:(NSString *)sourceApplication &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; annotation:(id)annotation &lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;url: %@&quot;,url);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FBSession.activeSession handleOpenURL:url]; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* Callback for session changes.&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
- (void)sessionStateChanged:(FBSession *)session&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state:(FBSessionState) state&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error:(NSError *)error&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (state) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case FBSessionStateOpen:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!error) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // We have a valid session&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;User session found&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case FBSessionStateClosed:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case FBSessionStateClosedLoginFailed:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FBSession.activeSession closeAndClearTokenInformation];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [[NSNotificationCenter defaultCenter]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postNotificationName:FBSessionStateChangedNotification&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object:session];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (error) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UIAlertView *alertView = [[UIAlertView alloc]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initWithTitle:@&quot;Error&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message:error.localizedDescription&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delegate:nil&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cancelButtonTitle:@&quot;OK&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; otherButtonTitles:nil];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [alertView show];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* Opens a Facebook session and optionally shows the login UX.&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FBSession openActiveSessionWithPermissions:permissions&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allowLoginUI:allowLoginUI&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; completionHandler:^(FBSession *session,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FBSessionState state,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSError *error) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self sessionStateChanged:session&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state:state&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error:error];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Add the following code inside applicationDidBecomeActive: method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (FBSession.activeSession.state == FBSessionStateCreatedOpening) {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FBSession.activeSession close]; // so we close our session and start over&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
// Now it&#39;s time to work on your view controller. Add the following observer inside the viewDidLoad: method of your view controller, where you want to share something:&lt;br /&gt;
&lt;br /&gt;
[[NSNotificationCenter defaultCenter]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addObserver:self&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selector:@selector(sessionStateChanged:)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name:FBSessionStateChangedNotification&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object:nil];&lt;br /&gt;
&lt;br /&gt;
// Here is the call back method for the notification observer&lt;br /&gt;
- (void)sessionStateChanged:(NSNotification*)notification {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FBSession.activeSession.isOpen) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[self.authButton setTitle:@&quot;Logout&quot; forState:UIControlStateNormal];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;State Open&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[self.authButton setTitle:@&quot;Login&quot; forState:UIControlStateNormal];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;State Closed&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Here is your facebook button&#39;s action:&lt;br /&gt;
&lt;br /&gt;
-(IBAction)facebookButtonPressed&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // you need to create the instance for your AppDelegate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [appDelegate openSessionWithAllowLoginUI:YES];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
*** If you want to login into your application with facebook login, you need to create an application at developer.facebook.com/apps&lt;br /&gt;
&lt;br /&gt;
*** Will post more functionality (post image, status, link, etc) later </content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/32539632679426881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/09/new-facebook-sdk-in-ios-is-great-built.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/32539632679426881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/32539632679426881'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/09/new-facebook-sdk-in-ios-is-great-built.html' title=''/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-1928437041289274673</id><published>2012-01-26T22:55:00.006+06:00</published><updated>2012-01-31T10:03:57.830+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom tabbar"/><category scheme="http://www.blogger.com/atom/ns#" term="custom tabbarcontroller"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="tabbar"/><category scheme="http://www.blogger.com/atom/ns#" term="tabbarController"/><title type='text'>How to make a Customized TabBarController with images</title><content type='html'>First Add a UITabBarController in your storyboard or main window. Then give it a reference from your AppDelegate and override this with a custom tab bar controller class.&lt;br /&gt;&lt;br /&gt;Below is a sample screen with a custom tab bar controller:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPW3QRij9cSiAPZbaL5FMhR-iqg92VbOVqBBFrTbDqsdYzkRA907qC9SRqWclEQU6IR-4IMN5JQu34TzKCez-ApsTc9P-WV56eR7VE6ZnwLkip6vWDQ0WQOX3AoWcZZgaE_ndPOL-atU6/s1600/01.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 293px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPW3QRij9cSiAPZbaL5FMhR-iqg92VbOVqBBFrTbDqsdYzkRA907qC9SRqWclEQU6IR-4IMN5JQu34TzKCez-ApsTc9P-WV56eR7VE6ZnwLkip6vWDQ0WQOX3AoWcZZgaE_ndPOL-atU6/s400/01.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5703641525105518178&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Here, Contacts, Activity, Chat &amp;amp; History are the 4 tabs where Chat tab is currently selected.&lt;br /&gt;&lt;br /&gt;There is an example of a custom class for a UITabBarController with a backgroun image and 3 buttons with custom action &amp;amp; image.&lt;br /&gt;&lt;br /&gt;This is the custom tab bar controller class can be look like:  &lt;p&gt;// CustomTabBarController.h&lt;/p&gt;  &lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;#import &lt;uikit h=&quot;&quot;&gt;&lt;/uikit&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@interface&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CustomTabBarController&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UITabBarController&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@property&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;nonatomic&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; retain&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@property&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;nonatomic&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; retain&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@property&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;nonatomic&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; retain&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; addCustomElements&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; selectTab&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tabID&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@end&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;// CustomTabBarController.m&lt;/p&gt;  &lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;#import &quot;CustomTabBarController.h&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@implementation&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CustomTabBarController&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@synthesize&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; settingsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; infoButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; aboutUsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;viewDidAppear&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;BOOL&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;animated &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; viewDidAppear&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;animated&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;viewDidLoad&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; viewDidLoad&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; addCustomElements&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addCustomElements&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Background&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImageView&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; bgView &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[[[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImageView&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; alloc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; initWithImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;          [&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;tabBarBackground.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; autorelease&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;bgView&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;frame &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CGRectMake&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;420&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;320&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;view addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;bgView&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Initialise our two images&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImage &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;settings.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;                                 @&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;settingsSelected.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;    //Setup the button&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; buttonWithType&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButtonTypeCustom&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;    // Set the frame (size and position) of the button)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    settingsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;frame &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CGRectMake&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;426&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;    // Set the image for the normal state of the button&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImage forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;                                             &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateNormal&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Set the image for the highlighted state of the button&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                        UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;   // Set the image for the selected state of the button&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                           UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;   // Set the image for the disabled state of the button&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;                                           &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateDisabled&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;               (&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)];&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;   /* Assign the button a &quot;tag&quot; so when our &quot;click&quot; event is called&lt;br /&gt;   we know which button was pressed.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;*/&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setTag&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;101&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Set this button as selected (we will select the others to false&lt;br /&gt;   as we only want Tab 1 to be selected initially).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;*/&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Now we repeat the process for the other buttons&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;btnImage &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;info.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;btnImageSelected &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;infoSelected.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; buttonWithType&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButtonTypeCustom&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;infoButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;frame &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CGRectMake&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;426&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImage forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;                                         &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateNormal&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;                                       &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                    UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;           (&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setTag&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;102&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;btnImage &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;aboutUs.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;btnImageSelected &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIImage&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; imageNamed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;aboutUsSelected.png&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; buttonWithType&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButtonTypeCustom&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;aboutUsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;frame &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CGRectMake&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;210&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;426&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImage forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                            UIControlStateNormal&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                          UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setBackgroundImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;&lt;br /&gt;                                       UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setImage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;btnImageSelected forState&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;br /&gt;              (&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateHighlighted&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlStateSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setTag&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;103&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// Add my new buttons to the view&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;view addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;view addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;view addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;/* Setup event handlers so that the buttonClicked method will&lt;br /&gt;   respond to the touch up inside event.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;*/&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton addTarget&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; action&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;buttonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;                    forControlEvents&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlEventTouchUpInside&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton addTarget&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; action&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;buttonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;                    forControlEvents&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlEventTouchUpInside&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton addTarget&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; action&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;buttonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;                    forControlEvents&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlEventTouchUpInside&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;buttonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;sender&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; tagNum &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;sender tag&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; selectTab&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tagNum&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;selectTab&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tabID&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;switch&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tabID&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;case&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;101&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;case&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;102&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;case&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;103&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton setSelected&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;selectedIndex &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; tabID&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;dealloc &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;settingsButton release&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;infoButton release&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;aboutUsButton release&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; dealloc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@end&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/1928437041289274673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/01/how-to-make-customized-tabbarcontroller.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1928437041289274673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1928437041289274673'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/01/how-to-make-customized-tabbarcontroller.html' title='How to make a Customized TabBarController with images'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPW3QRij9cSiAPZbaL5FMhR-iqg92VbOVqBBFrTbDqsdYzkRA907qC9SRqWclEQU6IR-4IMN5JQu34TzKCez-ApsTc9P-WV56eR7VE6ZnwLkip6vWDQ0WQOX3AoWcZZgaE_ndPOL-atU6/s72-c/01.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-1924380274253795308</id><published>2012-01-05T13:38:00.005+06:00</published><updated>2012-01-12T11:23:05.639+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="in-app sms"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="sending sms"/><category scheme="http://www.blogger.com/atom/ns#" term="sms"/><category scheme="http://www.blogger.com/atom/ns#" term="sms through app"/><title type='text'>How to send In-app SMS through iOS application</title><content type='html'>/* This feature is available in iOS 4 or later */&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 1:&lt;/h3&gt; &lt;p&gt;Import the MessageUI Framework into your project and #import the  header file  into the “.h” file of your controller where you want to  open the In-App SMS sheet.&lt;/p&gt; &lt;h3&gt;Step 2:&lt;/h3&gt; &lt;p&gt;You might already have a button handler IBAction where you want to  send the SMS. If not create a Button on your XIB file and write  IBActions for it.&lt;/p&gt; &lt;h3&gt;Step 3:&lt;/h3&gt; &lt;p&gt;The real code&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;objc&quot;  style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color:#002200;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;IBAction&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt; sendInAppSMS&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt; sender&lt;br /&gt;&lt;span style=&quot;color:#002200;&quot;&gt;{&lt;/span&gt;&lt;br /&gt; MFMessageComposeViewController &lt;span style=&quot;color:#002200;&quot;&gt;*&lt;/span&gt;controller &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt;   [&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;MFMessageComposeViewController alloc&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt; autorelease&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color:#a61390;&quot;&gt;&lt;br /&gt; if&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;MFMessageComposeViewController canSendText&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#002200;&quot;&gt;   {&lt;/span&gt; &lt;br /&gt;    controller.body &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color:#bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;Hello from Erfan&quot;&lt;/span&gt;;&lt;br /&gt;    controller.recipients &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#400080;&quot;&gt;NSArray&lt;/span&gt; arrayWithObjects&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&lt;br /&gt;                                @&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;12345678&quot;&lt;/span&gt;, &lt;span style=&quot;color:#bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;87654321&quot;&lt;/span&gt;, &lt;span style=&quot;color:#a61390;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;    controller.messageComposeDelegate &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; self;&lt;br /&gt; &lt;span style=&quot;color:#002200;&quot;&gt;   [&lt;/span&gt;self presentModalViewController&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;controller animated&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#a61390;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;;  &lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The most important part here is the line [MFMessageComposeViewController canSendText].&lt;br /&gt;When sending a in-app email, you can choose to ignore this (atleast as  of now) because most of the devices would have upgraded to iPhone OS 3  and all those devices would have the ability to send in-app email.  However, the same doesn’t apply to SMS. Remember that even if a device  is running iPhone OS 4, if it’s an iPod touch, it will never be abel to  send SMS within app.&lt;br /&gt;In this case, You have to use an if condition to send the SMS. Practically  speaking, you should enable/disable the button the user taps to send the  sms based on this. You can add the code that does this in your  viewDidLoad method. &lt;/p&gt; &lt;h3&gt;Step 4:&lt;/h3&gt; &lt;p&gt;Implement Delegate Callbacks.&lt;br /&gt;In your header file, implement the callbacks,  MFMessageComposeViewControllerDelegate and  UINavigationControllerDelegate. If you don’t you will get a warning at  the line,&lt;/p&gt;  &lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;objc&quot;  style=&quot;font-family:monospace;&quot;&gt; controller.delegate &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; self;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;You have to handle a callback method of MFMessageComposeViewControllerDelegate so as to dismiss the modal view controller.&lt;/p&gt;  &lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;objc&quot;  style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color:#002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;messageComposeViewController&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt; (&lt;/span&gt;MFMessageComposeViewController &lt;span style=&quot;color:#002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;controller&lt;br /&gt; didFinishWithResult&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;MessageComposeResult&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;result &lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color:#a61390;&quot;&gt;switch&lt;/span&gt; &lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;result&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color:#002200;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;     &lt;span style=&quot;color:#a61390;&quot;&gt;case&lt;/span&gt; MessageComposeResultCancelled&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;  &lt;br /&gt;        NSLog&lt;span style=&quot;color:#002200;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;Cancelled&quot;&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;)&lt;/span&gt;;    &lt;span style=&quot;color:#a61390;&quot;&gt;&lt;br /&gt;        break&lt;/span&gt;; &lt;br /&gt;   &lt;span style=&quot;color:#a61390;&quot;&gt;case&lt;/span&gt; MessageComposeResultFailed&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;  &lt;br /&gt;        UIAlertView &lt;span style=&quot;color:#002200;&quot;&gt;*&lt;/span&gt;alert &lt;span style=&quot;color:#002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;UIAlertView alloc&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;&lt;br /&gt;           initWithTitle&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;MyApp&quot;&lt;/span&gt; message&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#bf1d1a;&quot;&gt;&quot;Unknown Error&quot;&lt;br /&gt;&lt;/span&gt;             delegate&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;self cancelButtonTitle&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;@”OK”&lt;br /&gt;           otherButtonTitles&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color:#a61390;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;; &lt;br /&gt;        &lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;alert show&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;; &lt;br /&gt;        &lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;alert release&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;;  &lt;br /&gt;        &lt;span style=&quot;color:#a61390;&quot;&gt;break&lt;/span&gt;;   &lt;span style=&quot;color:#a61390;&quot;&gt;&lt;br /&gt;   case&lt;/span&gt; MessageComposeResultSent&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;      &lt;span style=&quot;color:#a61390;&quot;&gt;&lt;br /&gt;        break&lt;/span&gt;; &lt;br /&gt;   &lt;span style=&quot;color:#a61390;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;  &lt;br /&gt;        &lt;span style=&quot;color:#a61390;&quot;&gt;break&lt;/span&gt;;  &lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt; }&lt;/span&gt;  &lt;br /&gt; &lt;span style=&quot;color:#002200;&quot;&gt;[&lt;/span&gt;self dismissModalViewControllerAnimated&lt;span style=&quot;color:#002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#a61390;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color:#002200;&quot;&gt;]&lt;/span&gt;; &lt;span style=&quot;color:#002200;&quot;&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;That’s it. Your app should now be able to send SMS using the new Message UI sheet. :-)</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/1924380274253795308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/01/how-to-send-in-app-sms-through-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1924380274253795308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1924380274253795308'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2012/01/how-to-send-in-app-sms-through-ios.html' title='How to send In-app SMS through iOS application'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-1171879928022792171</id><published>2011-11-23T14:48:00.002+06:00</published><updated>2012-05-05T11:28:43.084+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="get ip address"/><category scheme="http://www.blogger.com/atom/ns#" term="ip address"/><category scheme="http://www.blogger.com/atom/ns#" term="retrieve ip address"/><title type='text'>How to retrieve device&#39;s IP Address programmatically</title><content type='html'>// Add these header files in your *.m file&lt;br /&gt;
&lt;span class=&quot;commentBody&quot; data-jsid=&quot;text&quot;&gt;#include &quot;ifaddrs.h&quot;&lt;br /&gt; #include &quot;arpa/inet.h&quot;&lt;/span&gt;&lt;ifaddrs.h&gt;&lt;arpa h=&quot;&quot;&gt;&lt;ifaddrs.h&gt;&lt;arpa h=&quot;&quot;&gt;&lt;br /&gt;&lt;br /&gt;// Add this function in your *.m file&lt;br /&gt;- (NSString *)getIPAddress {&lt;br /&gt; &lt;br /&gt;   NSString *address = @&quot;error&quot;;&lt;br /&gt;   struct ifaddrs *interfaces = NULL;&lt;br /&gt;   struct ifaddrs *temp_addr = NULL;&lt;br /&gt;   int success = 0;&lt;br /&gt;   // retrieve the current interfaces - returns 0 on success&lt;br /&gt;   success = getifaddrs(&amp;amp;interfaces);&lt;br /&gt;   if (success == 0) {&lt;br /&gt;       // Loop through linked list of interfaces&lt;br /&gt;       temp_addr = interfaces;&lt;br /&gt;       while(temp_addr != NULL) {&lt;br /&gt;           if(temp_addr-&amp;gt;ifa_addr-&amp;gt;sa_family == AF_INET) {&lt;br /&gt;               // Check if interface is en0 which is the wifi connection on the iPhone&lt;br /&gt;               if([[NSString stringWithUTF8String:temp_addr-&amp;gt;ifa_name] isEqualToString:@&quot;en0&quot;]) {&lt;br /&gt;                   // Get NSString from C String&lt;br /&gt;                   address = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr-&amp;gt;ifa_addr)-&amp;gt;sin_addr)];&lt;br /&gt;                 &lt;br /&gt;               }&lt;br /&gt;             &lt;br /&gt;           }&lt;br /&gt;         &lt;br /&gt;           temp_addr = temp_addr-&amp;gt;ifa_next;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;   // Free memory&lt;br /&gt;   freeifaddrs(interfaces);&lt;br /&gt;   return address;&lt;br /&gt; &lt;br /&gt;}&lt;/arpa&gt;&lt;/ifaddrs.h&gt;&lt;/arpa&gt;&lt;/ifaddrs.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/1171879928022792171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/11/how-to-retrieve-devices-ip-address.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1171879928022792171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1171879928022792171'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/11/how-to-retrieve-devices-ip-address.html' title='How to retrieve device&#39;s IP Address programmatically'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2079681211751150558</id><published>2011-10-10T18:10:00.007+06:00</published><updated>2012-01-05T14:09:32.423+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="expand sliding area"/><category scheme="http://www.blogger.com/atom/ns#" term="extend thumb of a slider"/><category scheme="http://www.blogger.com/atom/ns#" term="more sensitive slider"/><category scheme="http://www.blogger.com/atom/ns#" term="responsive slider"/><category scheme="http://www.blogger.com/atom/ns#" term="slider button"/><category scheme="http://www.blogger.com/atom/ns#" term="sliding area extend"/><title type='text'>More sensitive or responsive custom UISlider</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZsuBbr9upKpirpyOftPDGAvu965iEE3JMFQDBNvLZqErzIDcpMRoEVlY4OSmqei25K885wBUe1gkUZcrbT_8iLC3TkDcqp42bVFvjCizXoBxwz2eq9Oj5RTCMfshKZ7FNMzYmvF69Q_Ic/s400/slider.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 44px;&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5661839599100698322&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Normally a slider contains a limited area to detect the touch &amp;amp; act on that. Default height of a&lt;/div&gt;&lt;div&gt;slider is 23 pixels, in which the thumb contains only 19 pixels area to get the touch.&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jXlAIsjUtx3DRUOXQrtsMxwagNSYb7s_KpHN8TrRZlVzyt3iTwKCnZMKXe6UgwB_L-wkUyAWU9qaf1YUSqpEvd15F1g_LU2pOyWMdG3j6m33cII3sn_KSKCT-dK0mMjtqNM2DjzHz0oG/s400/slider2.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 44px;&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5661839949759323378&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sometimes we need to use a slider which should act more smooth &amp;amp; responsive just like the native &quot;Slide to unlock&quot; button of iPhone. So, for that, we need to increase the area of touch of a slider.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2MooTDyds1K5dR_pOjhmzwFoL1XKEsd3oCJeCMz9l3isoiP6I6oMdt9N_7jsDy9bu5SZsvtQwby5_hheVDnDG2Gw2bfWWqun_pZxGaUxnubjo3CXKY5sS9iZ60ou0yAXJM_4jfThRzCrk/s400/slider3.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 44px;&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5661840290935494594&quot; border=&quot;0&quot; /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;To make a slider with increased touch area, at first you need to make a subclass of UISlider, such as MySlider.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So MySlider.h file will look like this:&lt;div&gt; &lt;p class=&quot;p3&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&lt;foundation h=&quot;&quot;&gt;&lt;/foundation&gt;&lt;/p&gt; &lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s2&quot;&gt;@interface&lt;/span&gt; MySliderClass : &lt;span class=&quot;s3&quot;&gt;UISlider&lt;/span&gt; {    &lt;/p&gt; &lt;p class=&quot;p4&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;@end&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;MySlider.m file will look like this:&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;        &lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&quot;MySliderClass.h&quot;&lt;/p&gt; &lt;p class=&quot;p2&quot;&gt;&lt;/p&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;/* How many extra touchable pixels you want above and below&lt;br /&gt;the 23px (default height) slider */&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;#define SIZE_EXTENSION_Y -&lt;span class=&quot;s2&quot;&gt;10 // Adjust this value as required in your project&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s2&quot;&gt;// Define another value if you want to extend size in x-axis&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;p3&quot;&gt;@implementation&lt;span class=&quot;s3&quot;&gt; MySliderClass&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;p5&quot;&gt;- (&lt;span class=&quot;s4&quot;&gt;BOOL&lt;/span&gt;) pointInside:(&lt;span class=&quot;s5&quot;&gt;CGPoint&lt;/span&gt;)point withEvent:(&lt;span class=&quot;s5&quot;&gt;UIEvent&lt;/span&gt;*)event {&lt;/p&gt; &lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s3&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;(&lt;/span&gt;@&quot;pointSide&quot;&lt;span class=&quot;s3&quot;&gt;);&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;p5&quot;&gt;    &lt;span class=&quot;s5&quot;&gt;CGRect&lt;/span&gt; bounds = &lt;span class=&quot;s4&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;s5&quot;&gt;bounds&lt;/span&gt;;&lt;/p&gt; &lt;p class=&quot;p5&quot;&gt;    bounds = &lt;span class=&quot;s5&quot;&gt;CGRectInset&lt;/span&gt;(bounds, &lt;span class=&quot;s2&quot;&gt;0&lt;/span&gt;, SIZE_EXTENSION_Y);&lt;/p&gt; &lt;p class=&quot;p5&quot;&gt;    &lt;span class=&quot;s4&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;CGRectContainsPoint&lt;/span&gt;(bounds, point);&lt;/p&gt; &lt;p class=&quot;p5&quot;&gt;}&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;  white-space: normal; font-family:Georgia, serif;font-size:16px;&quot;  &gt;@end&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;  white-space: normal; font-family:Georgia, serif;font-size:16px;&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;  white-space: normal; font-family:Georgia, serif;font-size:16px;&quot;  &gt;Now in your interface builder, &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;  white-space: normal; font-family:Georgia, serif;font-size:16px;&quot;  &gt;set the slider to use your new MySlider subclass, and you now have a slider with a 43px touchable height.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2079681211751150558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/10/more-sensitive-or-responsive-custom.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2079681211751150558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2079681211751150558'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/10/more-sensitive-or-responsive-custom.html' title='More sensitive or responsive custom UISlider'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZsuBbr9upKpirpyOftPDGAvu965iEE3JMFQDBNvLZqErzIDcpMRoEVlY4OSmqei25K885wBUe1gkUZcrbT_8iLC3TkDcqp42bVFvjCizXoBxwz2eq9Oj5RTCMfshKZ7FNMzYmvF69Q_Ic/s72-c/slider.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3709379921279297405</id><published>2011-09-22T16:57:00.005+06:00</published><updated>2011-09-22T17:09:06.484+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mobile number validation"/><category scheme="http://www.blogger.com/atom/ns#" term="phone number validation"/><category scheme="http://www.blogger.com/atom/ns#" term="telephone number validation"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>Telephone Number validation in a UITextField</title><content type='html'>// First you need to implement the UITextFieldDelegate in the .h file&lt;br /&gt;// This validation will test, whether the number started with a &#39;+&#39; character or not &amp;amp; the number is not more than 19 digits.&lt;br /&gt;- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string&lt;br /&gt;{&lt;br /&gt;   NSCharacterSet *invalidCharSet;&lt;br /&gt;   if(textField == txtTelephoneNumber)&lt;br /&gt;   {&lt;br /&gt;       invalidCharSet = [[NSCharacterSet characterSetWithCharactersInString:@&quot; +0123456789&quot;] invertedSet];&lt;br /&gt;       if([textField.text length] &amp;lt; 1)&lt;br /&gt;       {&lt;br /&gt;           if ([string characterAtIndex:0] != &#39;+&#39;)&lt;br /&gt;           {&lt;br /&gt;               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Error!&quot; message:@&quot;You must enter a valid telephone number. (Example: +8801913952792 ...)&quot; delegate:nil cancelButtonTitle:@&quot;OK&quot; otherButtonTitles:nil];&lt;br /&gt;               [alert show];&lt;br /&gt;               [alert release];&lt;br /&gt;               return NO;&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;           if ([textField.text characterAtIndex:0] != &#39;+&#39;) {&lt;br /&gt;               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Error!&quot; message:@&quot;You must enter a valid telephone number. (Example: +01913952792 ...)&quot; delegate:nil cancelButtonTitle:@&quot;OK&quot; otherButtonTitles:nil];&lt;br /&gt;               [alert show];&lt;br /&gt;               [alert release];&lt;br /&gt;               return NO;&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;       if([textField.text length] &amp;gt; 19 &amp;amp;&amp;amp; range.length == 0)&lt;br /&gt;           return NO;&lt;br /&gt;   }&lt;br /&gt;else&lt;br /&gt;    {&lt;br /&gt;        invalidCharSet = [NSCharacterSet characterSetWithCharactersInString:@&quot;&quot;];&lt;br /&gt;        //return [self validateEmail:string];&lt;br /&gt;        //invalidCharSet = [[NSCharacterSet characterSetWithCharactersInString:@&quot;&quot;] invertedSet];&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    NSString *filtered = [[string componentsSeparatedByCharactersInSet:invalidCharSet] componentsJoinedByString:@&quot;&quot;];&lt;br /&gt;   &lt;br /&gt;    if(![string isEqualToString:filtered])&lt;br /&gt;        return NO;&lt;br /&gt;    else&lt;br /&gt;        return YES;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3709379921279297405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/09/telephone-number-validation-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3709379921279297405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3709379921279297405'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/09/telephone-number-validation-in.html' title='Telephone Number validation in a UITextField'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-12543439432542057</id><published>2011-09-22T16:49:00.002+06:00</published><updated>2011-09-22T16:57:09.501+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="email address validation"/><category scheme="http://www.blogger.com/atom/ns#" term="email validation"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>Email address validation in a text field</title><content type='html'>// This function will return either TRUE or FALSE depending on the validity of a given email address&lt;br /&gt;-(BOOL) validateEmail: (NSString *) candidate {&lt;br /&gt;    NSString *emailRegex = @&quot;[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}&quot;;&lt;br /&gt;    NSPredicate *emailTest = [NSPredicate predicateWithFormat:@&quot;SELF MATCHES %@&quot;, emailRegex];&lt;br /&gt;    return [emailTest evaluateWithObject:candidate];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Implement the UITextFieldDelegate in the .h file&lt;br /&gt;-(BOOL)textFieldShouldReturn:(UITextField *)textField&lt;br /&gt;{&lt;br /&gt;    if(textField == txtEmail)&lt;br /&gt;    {&lt;br /&gt;        if([self validateEmail:textField.text])&lt;br /&gt;            [textField resignFirstResponder];&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Error!&quot; message:@&quot;Please enter a valid email address.&quot; delegate:nil cancelButtonTitle:@&quot;OK&quot; otherButtonTitles:nil];&lt;br /&gt;            [alert show];&lt;br /&gt;            [alert release];&lt;br /&gt;            return NO;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return YES;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/12543439432542057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/09/email-address-validation-in-text-field.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/12543439432542057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/12543439432542057'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/09/email-address-validation-in-text-field.html' title='Email address validation in a text field'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-6966205427439855425</id><published>2011-07-19T20:03:00.004+06:00</published><updated>2011-09-16T20:06:37.034+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iphone unlock button"/><category scheme="http://www.blogger.com/atom/ns#" term="slide to unlock"/><category scheme="http://www.blogger.com/atom/ns#" term="slider button"/><title type='text'>How to make a slider button just like iPhone&#39;s native Unlock Button</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHW4JfIt7ujnicHuA1UFRY7issEJyJXMXb0kKq_u8489SaalLMSvlTZXjMxQYhQaP6Hf8Amq-6ji1MxssNJCyCPFQuM5kGtm4vcsbj-VM7YlaRVLfeG2ajIuusOwAE2viuER38fyEd6i1J/s1600/01.png&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 208px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHW4JfIt7ujnicHuA1UFRY7issEJyJXMXb0kKq_u8489SaalLMSvlTZXjMxQYhQaP6Hf8Amq-6ji1MxssNJCyCPFQuM5kGtm4vcsbj-VM7YlaRVLfeG2ajIuusOwAE2viuER38fyEd6i1J/s400/01.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5652957592862709570&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;/* In the above screen shot, i&#39;ve used the UISlider as a alarm triggering object. (as required in an application) */&lt;br /&gt;&lt;br /&gt;/* Use your custom images as your requirements. Declare required variables &amp;amp; objects in *.h file. You will need a UIImageView, a UILabel, a UIButton &amp;amp; a UISlider in your NIB file and locate them to desired name.*/&lt;br /&gt;&lt;br /&gt;- (void)viewDidLoad {&lt;br /&gt;  [super viewDidLoad];&lt;br /&gt;  // initialize custom UISlider (you have to do this in viewdidload or applicationdidfinishlaunching.&lt;br /&gt;  UIImage *stetchLeftTrack= [[UIImage imageNamed:@&quot;Nothing.png&quot;]&lt;br /&gt;                    stretchableImageWithLeftCapWidth:30.0 topCapHeight:0.0];&lt;br /&gt;  UIImage *stetchRightTrack= [[UIImage imageNamed:@&quot;Nothing.png&quot;]&lt;br /&gt;                     stretchableImageWithLeftCapWidth:30.0 topCapHeight:0.0];&lt;br /&gt;  [mySlider setThumbImage: [UIImage imageNamed:@&quot;SlideToStop.png&quot;] forState:UIControlStateNormal];&lt;br /&gt;  [mySlider setMinimumTrackImage:stetchLeftTrack forState:UIControlStateNormal];&lt;br /&gt;  [mySlider setMaximumTrackImage:stetchRightTrack forState:UIControlStateNormal];&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-(IBAction)LockIt&lt;br /&gt;{&lt;br /&gt;  mySlider.hidden = NO;&lt;br /&gt;  lockButton.hidden = YES;&lt;br /&gt;  Container.hidden = NO;&lt;br /&gt;  myLabel.hidden = NO;&lt;br /&gt;  myLabel.alpha = 1.0;&lt;br /&gt;  UNLOCKED = NO;&lt;br /&gt;  mySlider.value = 0.0;&lt;br /&gt;  NSString *str = @&quot;The iPhone is Locked!&quot;;&lt;br /&gt;  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Locked&quot; message:str delegate:self cancelButtonTitle:nil otherButtonTitles:@&quot;OK&quot;, nil];&lt;br /&gt;  [alert show];&lt;br /&gt;  [alert release];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)fadeLabel&lt;br /&gt;{&lt;br /&gt;  myLabel.alpha = 1.0 - mySlider.value;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)UnLockIt&lt;br /&gt;{&lt;br /&gt;  if (!UNLOCKED)&lt;br /&gt;  {&lt;br /&gt;      if (mySlider.value == 1.0)&lt;br /&gt;      {  // if user slide far enough, stop the operation &lt;br /&gt;           // Put here what happens when it is unlocked&lt;br /&gt;       &lt;br /&gt;          mySlider.hidden = YES;&lt;br /&gt;          lockButton.hidden = NO;&lt;br /&gt;          Container.hidden = YES;&lt;br /&gt;          myLabel.hidden = YES;&lt;br /&gt;          UNLOCKED = YES;&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;          // user did not slide far enough, so return back to 0 position&lt;br /&gt;          [UIView beginAnimations: @&quot;SlideCanceled&quot; context: nil];&lt;br /&gt;          [UIView setAnimationDelegate: self];&lt;br /&gt;          [UIView setAnimationDuration: 0.35];&lt;br /&gt;          // use CurveEaseOut to create &quot;spring&quot; effect&lt;br /&gt;          [UIView setAnimationCurve: UIViewAnimationCurveEaseOut]; &lt;br /&gt;          mySlider.value = 0.0;&lt;br /&gt;          [UIView commitAnimations];&lt;br /&gt;&lt;br /&gt;/* if u don&#39;t want to use custom animation with desired duration then u can use the following line :&lt;br /&gt;&lt;br /&gt;[mySlider setValue:0.0 animated:YES];&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/6966205427439855425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/how-to-make-slider-button-just-like.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/6966205427439855425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/6966205427439855425'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/how-to-make-slider-button-just-like.html' title='How to make a slider button just like iPhone&#39;s native Unlock Button'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHW4JfIt7ujnicHuA1UFRY7issEJyJXMXb0kKq_u8489SaalLMSvlTZXjMxQYhQaP6Hf8Amq-6ji1MxssNJCyCPFQuM5kGtm4vcsbj-VM7YlaRVLfeG2ajIuusOwAE2viuER38fyEd6i1J/s72-c/01.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-9076620832413483486</id><published>2011-07-15T14:47:00.002+06:00</published><updated>2011-07-15T14:54:20.993+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ipod access"/><category scheme="http://www.blogger.com/atom/ns#" term="ipod music player"/><category scheme="http://www.blogger.com/atom/ns#" term="music player"/><category scheme="http://www.blogger.com/atom/ns#" term="music player access"/><title type='text'>Accessing &amp; playing iPod&#39;s music player through application</title><content type='html'>- (void)viewDidLoad {&lt;br /&gt;    [super viewDidLoad];&lt;br /&gt;&lt;br /&gt;   mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeAny];&lt;br /&gt;    mediaPicker.delegate = self;&lt;br /&gt;    mediaPicker.allowsPickingMultipleItems = YES;&lt;br /&gt;    mediaPicker.editing = YES;&lt;br /&gt;&lt;br /&gt;    [self musicPlayerInitialize];&lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(void)musicPlayerInitialize&lt;br /&gt;{&lt;br /&gt;    myPlayer = [MPMusicPlayerController iPodMusicPlayer];&lt;br /&gt;   &lt;br /&gt;    [myPlayer setQueueWithQuery: [MPMediaQuery songsQuery]];&lt;br /&gt;    [myPlayer setRepeatMode:MPMusicRepeatModeAll];&lt;br /&gt;   &lt;br /&gt;    [myPlayer beginGeneratingPlaybackNotifications];&lt;br /&gt;    [[NSNotificationCenter defaultCenter] addObserver:self&lt;br /&gt;                                             selector:@selector(changeTitle)&lt;br /&gt;                                            name:MPMusicPlayerControllerNowPlayingItemDidChangeNotification&lt;br /&gt;                                               object:myPlayer];&lt;br /&gt;&lt;br /&gt;    [[NSNotificationCenter defaultCenter] addObserver:self&lt;br /&gt;                                             selector:@selector(handleExternalVolumeChanged:)&lt;br /&gt;                                                 name:MPMusicPlayerControllerVolumeDidChangeNotification&lt;br /&gt;                                               object:myPlayer];&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-(void)changeTitle&lt;br /&gt;{&lt;br /&gt;    MPMediaItem *item = [myPlayer nowPlayingItem];&lt;br /&gt;    NSString *titleStr = [item valueForProperty:MPMediaItemPropertyTitle];   &lt;br /&gt;    lblSongTitle.text = titleStr;&lt;br /&gt;    NSLog(@&quot;Now Playing Song Name: %@&quot;,titleStr);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-(IBAction)playButtonPressed&lt;br /&gt;{&lt;br /&gt;    if(myPlayer.playbackState == MPMusicPlaybackStatePaused || myPlayer.playbackState == MPMusicPlaybackStateStopped)&lt;br /&gt;    {&lt;br /&gt;        [myPlayer play];&lt;br /&gt;        [btnMusicPlay setImage:[UIImage imageNamed:@&quot;pause_btn.png&quot;] forState:UIControlStateNormal];&lt;br /&gt;    }&lt;br /&gt;    else if(myPlayer.playbackState == MPMusicPlaybackStatePlaying)&lt;br /&gt;    {&lt;br /&gt;        [myPlayer pause];&lt;br /&gt;        [btnMusicPlay setImage:[UIImage imageNamed:@&quot;play_btn.png&quot;] forState:UIControlStateNormal];&lt;br /&gt;    }&lt;br /&gt;    [self changeTitle];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)nextButtonPressed&lt;br /&gt;{&lt;br /&gt;    [myPlayer skipToNextItem];&lt;br /&gt;    [self changeTitle];&lt;br /&gt;}&lt;br /&gt;   &lt;br /&gt;-(IBAction)prevButtonPressed&lt;br /&gt;{&lt;br /&gt;    [myPlayer skipToPreviousItem];&lt;br /&gt;    [self changeTitle];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)volumeChange:(id)sender&lt;br /&gt;{&lt;br /&gt;    [[NSUserDefaults standardUserDefaults] setFloat:myVolumeSlider.value forKey:@&quot;musicVolume&quot;];&lt;br /&gt;    myPlayer.volume = myVolumeSlider.value;&lt;br /&gt;    NSLog(@&quot;volume changing: %f&quot;,myVolumeSlider.value);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;- (void)handleExternalVolumeChanged:(id)notification {&lt;br /&gt;    // self.volumeSlider is a UISlider used to display music volume.&lt;br /&gt;    // self.musicPlayer.volume ranges from 0.0 to 1.0.&lt;br /&gt;    [myVolumeSlider setValue:myPlayer.volume animated:YES];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# pragma mark -&lt;br /&gt;# pragma mark media picker Delegate&lt;br /&gt;&lt;br /&gt;-(void)mediaPickerDidCancel:(MPMediaPickerController *)mediaPicker&lt;br /&gt;{&lt;br /&gt;    [self dismissModalViewControllerAnimated:YES];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(void)mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection&lt;br /&gt;{&lt;br /&gt;    NSMutableArray *tempArray = [[NSMutableArray alloc] init];&lt;br /&gt;    [tempArray addObject:mediaItemCollection];&lt;br /&gt;   &lt;br /&gt;    MPMediaItemCollection *tempMediaItem = [tempArray objectAtIndex:0];&lt;br /&gt;    [appDelegate.myPlayer setQueueWithItemCollection:tempMediaItem];&lt;br /&gt;    [appDelegate.myPlayer play];&lt;br /&gt;    [self dismissModalViewControllerAnimated:YES];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)playlistButtonPressed&lt;br /&gt;{&lt;br /&gt;    [self presentModalViewController:mediaPicker animated:YES];&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/9076620832413483486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/accessing-playing-ipods-music-player.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/9076620832413483486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/9076620832413483486'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/accessing-playing-ipods-music-player.html' title='Accessing &amp; playing iPod&#39;s music player through application'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3120298410471138147</id><published>2011-07-15T14:43:00.004+06:00</published><updated>2011-07-15T14:46:49.571+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="count down"/><category scheme="http://www.blogger.com/atom/ns#" term="count down timer"/><category scheme="http://www.blogger.com/atom/ns#" term="elapsed timer"/><category scheme="http://www.blogger.com/atom/ns#" term="remaining timer"/><category scheme="http://www.blogger.com/atom/ns#" term="timer"/><title type='text'>Countdown Timer with remaining time &amp; custom label (hr:min:sec)</title><content type='html'>-(IBAction)timerStartButtonPressed&lt;br /&gt;{&lt;br /&gt;  if(!isStarted)&lt;br /&gt;  {&lt;br /&gt;      isStarted = TRUE;&lt;br /&gt;      isPaused = FALSE;&lt;br /&gt;      timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerFunction:) userInfo:nil repeats:YES];&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(IBAction)timerPauseButtonPressed&lt;br /&gt;{&lt;br /&gt;  if(!isPaused)&lt;br /&gt;  {&lt;br /&gt;      isStarted = FALSE;&lt;br /&gt;      isPaused = TRUE;&lt;br /&gt;      [timer invalidate];&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-(void)timerFunction:(NSTimer *)theTimer&lt;br /&gt;{&lt;br /&gt;  second = second-1;&lt;br /&gt;  remSecond = remSecond + 1;&lt;br /&gt;&lt;br /&gt;  if(hour &amp;gt;= 0)&lt;br /&gt;  {&lt;br /&gt;      if (second &amp;lt; 0)&lt;br /&gt;          minute = minute-1;&lt;br /&gt;   &lt;br /&gt;      if(remSecond &amp;gt; 59)&lt;br /&gt;          remMinute = remMinute + 1;&lt;br /&gt;       &lt;br /&gt;      if(minute &amp;lt; 0)&lt;br /&gt;          hour = hour - 1;&lt;br /&gt;   &lt;br /&gt;      if(remMinute &amp;gt; 59)&lt;br /&gt;          remHour = remHour + 1;&lt;br /&gt;       &lt;br /&gt;      if(minute &amp;lt; 0 &amp;amp;&amp;amp; second &amp;lt; 0 &amp;amp;&amp;amp; hour &amp;lt; 0)&lt;br /&gt;      {&lt;br /&gt;          strSecond = @&quot;00&quot;;&lt;br /&gt;          strMinute = @&quot;00&quot;;&lt;br /&gt;          strHour = @&quot;00&quot;;&lt;br /&gt;       &lt;br /&gt;          NSString *tempTestDuration = [[NSUserDefaults standardUserDefaults] valueForKey:@&quot;restDuration&quot;];&lt;br /&gt;          NSArray *tempArray = [tempTestDuration componentsSeparatedByString:@&quot;:&quot;];&lt;br /&gt;       &lt;br /&gt;          remHour = [[tempArray objectAtIndex:0] intValue];&lt;br /&gt;          remMinute = [[tempArray objectAtIndex:1] intValue];&lt;br /&gt;          remSecond = [[tempArray objectAtIndex:2] intValue];&lt;br /&gt;       &lt;br /&gt;       &lt;br /&gt;          isStarted = FALSE;&lt;br /&gt;          isPaused = TRUE;&lt;br /&gt;       &lt;br /&gt;          [timer invalidate];&lt;br /&gt;          timer = nil;&lt;br /&gt;       &lt;br /&gt;          if(isTestRunning &amp;amp;&amp;amp; remainingSet &amp;lt; totalSet)&lt;br /&gt;          {&lt;br /&gt;              [self resetRest];&lt;br /&gt;              [self timerStartButtonPressed];&lt;br /&gt;          }&lt;br /&gt;          else if(!isTestRunning &amp;amp;&amp;amp; remainingSet &amp;lt; totalSet)&lt;br /&gt;          {&lt;br /&gt;              [self resetTest];&lt;br /&gt;              if([[NSUserDefaults standardUserDefaults] boolForKey:@&quot;isNewSongInEachTestOn&quot;] == YES)&lt;br /&gt;                  [appDelegate.myPlayer skipToNextItem];&lt;br /&gt;              [self timerStartButtonPressed];&lt;br /&gt;          }&lt;br /&gt;          else&lt;br /&gt;          {&lt;br /&gt;              UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Finish!!!&quot; message:@&quot;Time up.&quot; delegate:nil cancelButtonTitle:@&quot;Ok&quot; otherButtonTitles:nil];&lt;br /&gt;              [alert show];&lt;br /&gt;              [alert release];&lt;br /&gt;          }&lt;br /&gt;       &lt;br /&gt;          return;&lt;br /&gt;      }&lt;br /&gt;       &lt;br /&gt;      if (second&amp;gt;=0)&lt;br /&gt;      {&lt;br /&gt;          if (second&amp;lt;10)&lt;br /&gt;              strSecond = [NSString stringWithFormat:@&quot;0%d&quot;, second];&lt;br /&gt;          else&lt;br /&gt;              strSecond = [NSString stringWithFormat:@&quot;%d&quot;, second]; &lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;          second=59;&lt;br /&gt;          strSecond = [NSString stringWithFormat:@&quot;%d&quot;, second];&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      if(remSecond &amp;lt;= 59)&lt;br /&gt;      {&lt;br /&gt;          if (remSecond&amp;lt;10)&lt;br /&gt;              strRemSecond = [NSString stringWithFormat:@&quot;0%d&quot;, remSecond];&lt;br /&gt;          else&lt;br /&gt;              strRemSecond = [NSString stringWithFormat:@&quot;%d&quot;, remSecond]; &lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;          remSecond=0;&lt;br /&gt;          strRemSecond = [NSString stringWithFormat:@&quot;0%d&quot;, remSecond];&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      if(minute &amp;gt;= 0)&lt;br /&gt;      {&lt;br /&gt;          if (minute&amp;lt;10)&lt;br /&gt;              strMinute = [NSString stringWithFormat:@&quot;0%d&quot;, minute];&lt;br /&gt;          else&lt;br /&gt;              strMinute = [NSString stringWithFormat:@&quot;%d&quot;, minute];&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;          minute = 59;&lt;br /&gt;          strMinute = [NSString stringWithFormat:@&quot;%d&quot;,minute];&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      if(remMinute &amp;lt;= 59)&lt;br /&gt;      {&lt;br /&gt;          if (remMinute&amp;lt;10)&lt;br /&gt;              strRemMinute = [NSString stringWithFormat:@&quot;0%d&quot;, remMinute];&lt;br /&gt;          else&lt;br /&gt;              strRemMinute = [NSString stringWithFormat:@&quot;%d&quot;, remMinute];&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;          minute = 0;&lt;br /&gt;          strMinute = [NSString stringWithFormat:@&quot;0%d&quot;,remMinute];&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;      if (hour&amp;lt;10)&lt;br /&gt;          strHour = [NSString stringWithFormat:@&quot;0%d&quot;, hour];&lt;br /&gt;      else&lt;br /&gt;          strHour= [NSString stringWithFormat:@&quot;%d&quot;, hour];&lt;br /&gt;   &lt;br /&gt;      if (remHour&amp;lt;10)&lt;br /&gt;          strRemHour = [NSString stringWithFormat:@&quot;0%d&quot;, remHour];&lt;br /&gt;      else&lt;br /&gt;          strRemHour= [NSString stringWithFormat:@&quot;%d&quot;, remHour];&lt;br /&gt;   &lt;br /&gt;      NSString *tempStr = [NSString stringWithFormat:@&quot;%@:%@:%@&quot;,strHour,strMinute,strSecond];&lt;br /&gt;      NSString *tempStrRem = [NSString stringWithFormat:@&quot;%@:%@:%@&quot;,strRemHour,strRemMinute,strRemSecond];&lt;br /&gt;      NSLog(@&quot;tempStr: %@&quot;,tempStr);&lt;br /&gt;   &lt;br /&gt;      if([tempStr characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;      {&lt;br /&gt;          strHour = [NSString stringWithFormat:@&quot;%c&quot;,[tempStr characterAtIndex:1]];&lt;br /&gt;          tempStr = [NSString stringWithFormat:@&quot;%@:%@:%@&quot;,strHour,strMinute,strSecond];&lt;br /&gt;          NSLog(@&quot;tempStr: %@&quot;,tempStr);&lt;br /&gt;       &lt;br /&gt;          if([tempStr characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;          {&lt;br /&gt;              tempStr = [NSString stringWithFormat:@&quot;%@:%@&quot;,strMinute,strSecond];&lt;br /&gt;              NSLog(@&quot;tempStr: %@&quot;,tempStr);&lt;br /&gt;           &lt;br /&gt;              if([tempStr characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;              {&lt;br /&gt;                  strMinute = [NSString stringWithFormat:@&quot;%c&quot;,[tempStr characterAtIndex:1]];&lt;br /&gt;                  tempStr = [NSString stringWithFormat:@&quot;%@:%@&quot;,strMinute,strSecond];&lt;br /&gt;                  NSLog(@&quot;tempStr: %@&quot;,tempStr);&lt;br /&gt;               &lt;br /&gt;                  if([tempStr characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;                  {&lt;br /&gt;                      tempStr = [NSString stringWithFormat:@&quot;0:%@&quot;,strSecond];&lt;br /&gt;                      NSLog(@&quot;tempStr: %@&quot;,tempStr);&lt;br /&gt;                  }&lt;br /&gt;              }&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      if([tempStrRem characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;      {&lt;br /&gt;          strRemHour = [NSString stringWithFormat:@&quot;%c&quot;,[tempStrRem characterAtIndex:1]];&lt;br /&gt;          tempStrRem = [NSString stringWithFormat:@&quot;%@:%@:%@&quot;,strRemHour,strRemMinute,strRemSecond];&lt;br /&gt;          NSLog(@&quot;tempStr: %@&quot;,tempStrRem);&lt;br /&gt;       &lt;br /&gt;          if([tempStrRem characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;          {&lt;br /&gt;              tempStrRem = [NSString stringWithFormat:@&quot;%@:%@&quot;,strRemMinute,strRemSecond];&lt;br /&gt;              NSLog(@&quot;tempStr: %@&quot;,tempStrRem);&lt;br /&gt;           &lt;br /&gt;              if([tempStrRem characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;              {&lt;br /&gt;                  strRemMinute = [NSString stringWithFormat:@&quot;%c&quot;,[tempStrRem characterAtIndex:1]];&lt;br /&gt;                  tempStrRem = [NSString stringWithFormat:@&quot;%@:%@&quot;,strRemMinute,strRemSecond];&lt;br /&gt;                  NSLog(@&quot;tempStr: %@&quot;,tempStrRem);&lt;br /&gt;               &lt;br /&gt;                  if([tempStrRem characterAtIndex:0] == &#39;0&#39;)&lt;br /&gt;                  {&lt;br /&gt;                      tempStrRem = [NSString stringWithFormat:@&quot;0:%@&quot;,strRemSecond];&lt;br /&gt;                      NSLog(@&quot;tempStr: %@&quot;,tempStrRem);&lt;br /&gt;                  }&lt;br /&gt;              }&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;      lblTimerDisplay.text = tempStr;&lt;br /&gt;      lblRemainingTimeDisplay.text = [NSString stringWithFormat:@&quot;Elapsed Time %@&quot;,tempStrRem];&lt;br /&gt;  } &lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;      strSecond = @&quot;00&quot;;&lt;br /&gt;      strMinute = @&quot;00&quot;;&lt;br /&gt;      strHour = @&quot;00&quot;;&lt;br /&gt;   &lt;br /&gt;      [timer invalidate];&lt;br /&gt;  }&lt;br /&gt;   &lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3120298410471138147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/countdown-timer-with-remaining-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3120298410471138147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3120298410471138147'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/07/countdown-timer-with-remaining-time.html' title='Countdown Timer with remaining time &amp; custom label (hr:min:sec)'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-616828379468419752</id><published>2011-02-08T12:16:00.004+06:00</published><updated>2011-02-08T12:22:03.491+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image in pickerview"/><category scheme="http://www.blogger.com/atom/ns#" term="using custom view in picker view"/><title type='text'>Using image &amp; text together or custom view in a UIPickerView</title><content type='html'>&lt;span dir=&quot;ltr&quot; id=&quot;:50&quot;&gt;-(UIView *)pickerView:(U&lt;wbr&gt;IPickerView *)pickerView viewForRow:(NSI&lt;wbr&gt;nteger)row forComponent:(N&lt;wbr&gt;SInteger)compon&lt;wbr&gt;ent reusingView:(UI&lt;wbr&gt;View *)view {&lt;br /&gt;    &lt;br /&gt;     UIButton *customButton = [UIButton buttonWithType:&lt;wbr&gt;UIButtonTypeCus&lt;wbr&gt;tom];&lt;br /&gt;      customButton.fr&lt;wbr&gt;ame=CGRectMake(&lt;wbr&gt;5,5, 50, 50);&lt;br /&gt;    UIImage *anImage=[UIIma&lt;wbr&gt;ge imageNamed:yourImage];&lt;br /&gt;    [customButton setImage:anImag&lt;wbr&gt;e forState:UICont&lt;wbr&gt;rolStateNormal]&lt;wbr&gt;;&lt;br /&gt;  &lt;br /&gt;    UILabel *lblTemp = [[UILabel alloc] initWithFrame:C&lt;wbr&gt;GRectMake(60, 5, 400, 50)];&lt;br /&gt;    lblTemp.text = [NSString stringWithForma&lt;wbr&gt;t:yourText];&lt;br /&gt;  &lt;br /&gt;    UIView *tempView = [[UIView alloc] initWithFrame:C&lt;wbr&gt;GRectMake(0, 0, 460, 60)];&lt;br /&gt;    [tempView addSubview:lblT&lt;wbr&gt;emp];&lt;br /&gt;    [tempView addSubview:cust&lt;wbr&gt;omButton];&lt;br /&gt;    [view addSubview:temp&lt;wbr&gt;View];&lt;br /&gt;  &lt;br /&gt;    [lblTemp release];&lt;br /&gt;    [tempView release];&lt;br /&gt;    &lt;br /&gt;    return tempView;&lt;br /&gt;}&lt;/span&gt;&lt;div id=&quot;:4y&quot; class=&quot;kd&quot;&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/616828379468419752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/02/uiview-pickerviewu-ipickerview.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/616828379468419752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/616828379468419752'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/02/uiview-pickerviewu-ipickerview.html' title='Using image &amp; text together or custom view in a UIPickerView'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2911160142606283582</id><published>2011-02-02T01:10:00.002+06:00</published><updated>2011-02-02T01:20:10.748+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rotate with touch"/><category scheme="http://www.blogger.com/atom/ns#" term="rotating image"/><category scheme="http://www.blogger.com/atom/ns#" term="scale and rotate through 2 finger seipe"/><category scheme="http://www.blogger.com/atom/ns#" term="scale with touch"/><category scheme="http://www.blogger.com/atom/ns#" term="scaling image"/><title type='text'>Scaling &amp; Rotating UIImageView through 2 finger swipe</title><content type='html'>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&lt;br /&gt;&lt;br /&gt;  NSArray *allTouches = [touches allObjects];&lt;br /&gt;&lt;br /&gt;  UITouch* t;&lt;br /&gt;  if([[event allTouches] count]==1){&lt;br /&gt;      if (CGRectContainsPoint([smallImage frame], [[allTouches objectAtIndex:0] locationInView:self.view])) {&lt;br /&gt;          t=[[[event allTouches] allObjects] objectAtIndex:0];&lt;br /&gt;          touch1=[t locationInView:nil];&lt;br /&gt;      }&lt;br /&gt;  }else{&lt;br /&gt;      t=[[[event allTouches] allObjects] objectAtIndex:0];&lt;br /&gt;      touch1=[t locationInView:nil];&lt;br /&gt;      t=[[[event allTouches] allObjects] objectAtIndex:1];&lt;br /&gt;      touch2=[t locationInView:nil];&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {&lt;br /&gt;&lt;br /&gt;  CGPoint currentTouch1;&lt;br /&gt;  CGPoint currentTouch2;&lt;br /&gt;  NSArray *allTouches = [touches allObjects];&lt;br /&gt;  UITouch* t;&lt;br /&gt;  float scale,rotation;&lt;br /&gt;&lt;br /&gt;  if([[event allTouches] count]==1){&lt;br /&gt;      t=[[[event allTouches] allObjects] objectAtIndex:0];&lt;br /&gt;      if (CGRectContainsPoint([smallImage frame], [[allTouches objectAtIndex:0] locationInView:self.view]))&lt;br /&gt;      { &lt;br /&gt;          touch2=[t locationInView:nil];&lt;br /&gt;          smallImage.center=CGPointMake(smallImage.center.x+touch2.x-touch1.x,smallImage.center.y+touch2.y-touch1.y);&lt;br /&gt;          touch1=touch2;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;  else if([[event allTouches] count]==2)&lt;br /&gt;  {&lt;br /&gt;      t=[[[event allTouches] allObjects] objectAtIndex:0];&lt;br /&gt;      currentTouch1=[t locationInView:nil];&lt;br /&gt;   &lt;br /&gt;      t=[[[event allTouches] allObjects] objectAtIndex:1];&lt;br /&gt;      currentTouch2=[t locationInView:nil];&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;      scale = [self distance:currentTouch1 toPoint:currentTouch2] / [self distance:touch1 toPoint:touch2];&lt;br /&gt;      rotation=atan2(currentTouch2.y-currentTouch1.y, currentTouch2.x-currentTouch1.x)-atan2(touch2.y-touch1.y,touch2.x-touch1.x);&lt;br /&gt;      if(isnan(scale)){&lt;br /&gt;          scale=1.0f;&lt;br /&gt;      }&lt;br /&gt;      NSLog(@&quot;rotation %f&quot;,rotation);&lt;br /&gt;   &lt;br /&gt;      NSLog(@&quot;scale %f&quot;,scale);&lt;br /&gt;   &lt;br /&gt;      if (CGRectContainsPoint([smallImage frame], [[allTouches objectAtIndex:0] locationInView:self.view]) &amp;amp;&amp;amp;&lt;br /&gt;          CGRectContainsPoint([smallImage frame], [[allTouches objectAtIndex:1] locationInView:self.view]))&lt;br /&gt;      {&lt;br /&gt;       &lt;br /&gt;          smallImage.transform=CGAffineTransformScale(smallImage.transform, scale,scale);&lt;br /&gt;          smallImage.transform=CGAffineTransformRotate(smallImage.transform, rotation);&lt;br /&gt;      }&lt;br /&gt;      else // In case of scaling or rotating the background imageView&lt;br /&gt;      {&lt;br /&gt;          imageView.transform=CGAffineTransformScale(imageView.transform, scale,scale);&lt;br /&gt;          imageView.transform=CGAffineTransformRotate(imageView.transform, rotation);&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      touch1=currentTouch1;&lt;br /&gt;      touch2=currentTouch2;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(double)distance:(CGPoint)point1 toPoint:(CGPoint)point2&lt;br /&gt;{&lt;br /&gt;  return sqrt(fabs(point1.x - point2.x) + fabs(point1.y - point2.y));&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2911160142606283582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/02/scaling-rotating-uiimageview-through-2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2911160142606283582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2911160142606283582'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/02/scaling-rotating-uiimageview-through-2.html' title='Scaling &amp; Rotating UIImageView through 2 finger swipe'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2830517240827853591</id><published>2011-01-11T12:27:00.001+06:00</published><updated>2011-01-11T12:41:06.692+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom alert"/><title type='text'>Creating a custom alert</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;//Background of AlertView is an image And you can change this image&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@&quot;Your Title&quot;&lt;br /&gt;                                                        message: @&quot;Your Message Here&quot;&lt;br /&gt;                                                       delegate:nil cancelButtonTitle:@&quot;OK&quot; otherButtonTitles:nil] autorelease];&lt;br /&gt;   &lt;br /&gt;    [theAlert show];&lt;br /&gt;   &lt;br /&gt;    UILabel *theTitle = [theAlert valueForKey:@&quot;_titleLabel&quot;];&lt;br /&gt;    [theTitle setTextColor:[UIColor redColor]];&lt;br /&gt;   &lt;br /&gt;    UILabel *theBody = [theAlert valueForKey:@&quot;_bodyTextLabel&quot;];&lt;br /&gt;    [theBody setTextColor:[UIColor blueColor]];&lt;br /&gt;   &lt;br /&gt;    UIImage *theImage = [UIImage imageNamed:@&quot;Background.png&quot;];&lt;br /&gt;    theImage = [theImage stretchableImageWithLeftCapWidth:16 topCapHeight:16];&lt;br /&gt;    CGSize theSize = [theAlert frame].size;&lt;br /&gt;   &lt;br /&gt;    UIGraphicsBeginImageContext(theSize);&lt;br /&gt;    [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];&lt;br /&gt;    theImage = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt;    UIGraphicsEndImageContext();&lt;br /&gt;   &lt;br /&gt;    [[theAlert layer] setContents:[theImage CGImage]];</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2830517240827853591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/creating-custom-alert.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2830517240827853591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2830517240827853591'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/creating-custom-alert.html' title='Creating a custom alert'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3227464819696515077</id><published>2011-01-07T15:54:00.001+06:00</published><updated>2011-01-07T15:59:30.551+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="limit character in text field"/><category scheme="http://www.blogger.com/atom/ns#" term="validating textfield"/><title type='text'>validating &amp; limit the character length of a TextField</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;*** This is a delegate method for UITextField &lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string&lt;br /&gt;{&lt;br /&gt;    NSCharacterSet *invalidCharSet = [[NSCharacterSet characterSetWithCharactersInString:@&quot;0123456789&quot;] invertedSet];&lt;br /&gt;    NSString *filtered = [[string componentsSeparatedByCharactersInSet:invalidCharSet] componentsJoinedByString:@&quot;&quot;];&lt;br /&gt;   &lt;br /&gt;    if (textField.text.length &gt;= MAX_LENGTH &amp;amp;&amp;amp; range.length == 0)&lt;br /&gt;    {&lt;br /&gt;        return NO; // return NO to not change text&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        if(![string isEqualToString:filtered])&lt;br /&gt;            return NO;&lt;br /&gt;        else&lt;br /&gt;            return YES;&lt;br /&gt;    }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3227464819696515077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/validating-limit-character-length-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3227464819696515077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3227464819696515077'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/validating-limit-character-length-of.html' title='validating &amp; limit the character length of a TextField'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3931158480668925321</id><published>2011-01-05T14:01:00.002+06:00</published><updated>2011-01-05T14:07:01.762+06:00</updated><title type='text'>Using a custom image button in a navigation bar</title><content type='html'>UIButton *button =  [UIButton buttonWithType:UIButtonTypeCustom];&lt;br /&gt;[button setImage:[UIImage imageNamed:@&quot;myImage.png&quot;] forState:UIControlStateNormal];&lt;br /&gt;[button addTarget:self action:@selector(blah) forControlEvents:UIControlEventTouchUpInside];&lt;br /&gt;[button setFrame:CGRectMake(0, 0, 32, 32)];&lt;br /&gt;self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;***the title of the nav controller will be auto resized this way. If you do it your way (subview of the nav bar) the text will go behind or ontop of the image&lt;br /&gt;&lt;br /&gt;***it will also stay on the screen as you pop and push view controllers.&lt;br /&gt;&lt;br /&gt;***once again, you can use an imageview as the custom view and not the button. Here is code:&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,32,32)];&lt;br /&gt;[iv setImage:[UIImage imageNamed:@&quot;myImage.png&quot;]];&lt;br /&gt;self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:iv];&lt;br /&gt;[iv release];</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3931158480668925321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/using-custom-image-button-in-navigation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3931158480668925321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3931158480668925321'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/using-custom-image-button-in-navigation.html' title='Using a custom image button in a navigation bar'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3469509973961280168</id><published>2011-01-05T11:25:00.002+06:00</published><updated>2011-01-05T11:26:43.688+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vibrate device"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone device"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone in app"/><title type='text'>Vibrate iPhone device through application</title><content type='html'>-(void)vibrate&lt;br /&gt;{&lt;br /&gt;     AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3469509973961280168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/vibrate-iphone-device-through_05.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3469509973961280168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3469509973961280168'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/vibrate-iphone-device-through_05.html' title='Vibrate iPhone device through application'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3792599433182612649</id><published>2011-01-05T11:25:00.001+06:00</published><updated>2011-01-05T11:26:42.319+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vibrate device"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone device"/><category scheme="http://www.blogger.com/atom/ns#" term="vibrate iphone in app"/><title type='text'>Vibrate iPhone device through application</title><content type='html'>-(void)vibrate&lt;br /&gt;{&lt;br /&gt;     AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3792599433182612649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/vibrate-iphone-device-through.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3792599433182612649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3792599433182612649'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/vibrate-iphone-device-through.html' title='Vibrate iPhone device through application'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2089881465224944221</id><published>2011-01-05T11:22:00.002+06:00</published><updated>2011-01-05T11:24:43.604+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jerk animation"/><category scheme="http://www.blogger.com/atom/ns#" term="jerk screen"/><category scheme="http://www.blogger.com/atom/ns#" term="jerking effects"/><category scheme="http://www.blogger.com/atom/ns#" term="shake animation"/><category scheme="http://www.blogger.com/atom/ns#" term="shake screen"/><category scheme="http://www.blogger.com/atom/ns#" term="shaking effects"/><title type='text'>Jerking Effects with an ImageView in y-axis</title><content type='html'>-(void)shakeImageInY&lt;br /&gt;{&lt;br /&gt; CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@&quot;transform.translation.y&quot;];&lt;br /&gt; anim.values = [NSArray arrayWithObjects:[NSNumber numberWithFloat:-15],&lt;br /&gt;       [NSNumber numberWithFloat:15],&lt;br /&gt;       nil];&lt;br /&gt; anim.duration = 0.2;&lt;br /&gt; anim.autoreverses = YES;&lt;br /&gt; &lt;br /&gt; anim.repeatCount = 0;&lt;br /&gt; anim.additive = YES;&lt;br /&gt; anim.fillMode=kCAFillModeForwards;&lt;br /&gt; [imageView.layer addAnimation:anim forKey:@&quot;wiggleTranslationY&quot;];&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2089881465224944221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/jerking-effects-with-imageview-in-y.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2089881465224944221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2089881465224944221'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/jerking-effects-with-imageview-in-y.html' title='Jerking Effects with an ImageView in y-axis'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-4351917818140497854</id><published>2011-01-05T11:21:00.004+06:00</published><updated>2011-01-05T11:24:02.691+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jerk animation"/><category scheme="http://www.blogger.com/atom/ns#" term="jerk screen"/><category scheme="http://www.blogger.com/atom/ns#" term="jerking effects"/><category scheme="http://www.blogger.com/atom/ns#" term="shake animation"/><category scheme="http://www.blogger.com/atom/ns#" term="shake screen"/><category scheme="http://www.blogger.com/atom/ns#" term="shaking effects"/><title type='text'>Jerking Effects with an ImageView in x-axis</title><content type='html'>-(void)shakeImageInX&lt;br /&gt;{&lt;br /&gt; CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@&quot;transform.translation.y&quot;];&lt;br /&gt; anim.values = [NSArray arrayWithObjects:[NSNumber numberWithFloat:-15],&lt;br /&gt;       [NSNumber numberWithFloat:15],&lt;br /&gt;       nil];&lt;br /&gt; anim.duration = 0.2;&lt;br /&gt; anim.autoreverses = YES;&lt;br /&gt; &lt;br /&gt; anim.repeatCount = 0;&lt;br /&gt; anim.additive = YES;&lt;br /&gt; anim.fillMode=kCAFillModeForwards;&lt;br /&gt; [imageView.layer addAnimation:anim forKey:@&quot;wiggleTranslationY&quot;];&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/4351917818140497854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/jerking-effects-with-imageview-in-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/4351917818140497854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/4351917818140497854'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2011/01/jerking-effects-with-imageview-in-x.html' title='Jerking Effects with an ImageView in x-axis'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-7918450973185564173</id><published>2010-10-15T14:57:00.001+06:00</published><updated>2010-10-15T14:59:08.007+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to rotate an image"/><category scheme="http://www.blogger.com/atom/ns#" term="image rotation"/><category scheme="http://www.blogger.com/atom/ns#" term="rotating image"/><title type='text'>Rotating an image with bounds &amp; unchanged ratio</title><content type='html'>- (void)scaleAndRotateImage:(UIImage *)image&lt;br /&gt;{&lt;br /&gt; int kMaxResolution = 320; // Or whatever&lt;br /&gt; &lt;br /&gt; CGImageRef imgRef = image.CGImage;&lt;br /&gt; &lt;br /&gt; CGFloat width = CGImageGetWidth(imgRef);&lt;br /&gt; CGFloat height = CGImageGetHeight(imgRef);&lt;br /&gt; &lt;br /&gt; CGAffineTransform transform = CGAffineTransformIdentity;&lt;br /&gt; CGRect bounds = CGRectMake(0, 0, width, height);&lt;br /&gt; if (width &gt; kMaxResolution || height &gt; kMaxResolution) {&lt;br /&gt;  CGFloat ratio = width/height;&lt;br /&gt;  if (ratio &gt; 1) {&lt;br /&gt;   bounds.size.width = kMaxResolution;&lt;br /&gt;   bounds.size.height = bounds.size.width / ratio;&lt;br /&gt;  }&lt;br /&gt;  else {&lt;br /&gt;   bounds.size.height = kMaxResolution;&lt;br /&gt;   bounds.size.width = bounds.size.height * ratio;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; CGFloat scaleRatio = bounds.size.width / width;&lt;br /&gt; CGSize imageSize = CGSizeMake(CGImageGetWidth(imgRef), CGImageGetHeight(imgRef));&lt;br /&gt; CGFloat boundHeight;&lt;br /&gt; UIImageOrientation orient = image.imageOrientation;&lt;br /&gt; switch(orient) {&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationUp: //EXIF = 1&lt;br /&gt;   transform = CGAffineTransformIdentity;&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationUpMirrored: //EXIF = 2&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(imageSize.width, 0.0);&lt;br /&gt;   transform = CGAffineTransformScale(transform, -1.0, 1.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationDown: //EXIF = 3&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(imageSize.width, imageSize.height);&lt;br /&gt;   transform = CGAffineTransformRotate(transform, M_PI);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationDownMirrored: //EXIF = 4&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(0.0, imageSize.height);&lt;br /&gt;   transform = CGAffineTransformScale(transform, 1.0, -1.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationLeftMirrored: //EXIF = 5&lt;br /&gt;   boundHeight = bounds.size.height;&lt;br /&gt;   bounds.size.height = bounds.size.width;&lt;br /&gt;   bounds.size.width = boundHeight;&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(imageSize.height, imageSize.width);&lt;br /&gt;   transform = CGAffineTransformScale(transform, -1.0, 1.0);&lt;br /&gt;   transform = CGAffineTransformRotate(transform, 3.0 * M_PI / 2.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationLeft: //EXIF = 6&lt;br /&gt;   boundHeight = bounds.size.height;&lt;br /&gt;   bounds.size.height = bounds.size.width;&lt;br /&gt;   bounds.size.width = boundHeight;&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(0.0, imageSize.width);&lt;br /&gt;   transform = CGAffineTransformRotate(transform, 3.0 * M_PI / 2.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationRightMirrored: //EXIF = 7&lt;br /&gt;   boundHeight = bounds.size.height;&lt;br /&gt;   bounds.size.height = bounds.size.width;&lt;br /&gt;   bounds.size.width = boundHeight;&lt;br /&gt;   transform = CGAffineTransformMakeScale(-1.0, 1.0);&lt;br /&gt;   transform = CGAffineTransformRotate(transform, M_PI / 2.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  case UIImageOrientationRight: //EXIF = 8&lt;br /&gt;   boundHeight = bounds.size.height;&lt;br /&gt;   bounds.size.height = bounds.size.width;&lt;br /&gt;   bounds.size.width = boundHeight;&lt;br /&gt;   transform = CGAffineTransformMakeTranslation(imageSize.height, 0.0);&lt;br /&gt;   transform = CGAffineTransformRotate(transform, M_PI / 2.0);&lt;br /&gt;   break;&lt;br /&gt;   &lt;br /&gt;  default:&lt;br /&gt;   [NSException raise:NSInternalInconsistencyException format:@&quot;Invalid image orientation&quot;];&lt;br /&gt;   &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; UIGraphicsBeginImageContext(bounds.size);&lt;br /&gt; &lt;br /&gt; CGContextRef context = UIGraphicsGetCurrentContext();&lt;br /&gt; &lt;br /&gt; if (orient == UIImageOrientationRight || orient == UIImageOrientationLeft) {&lt;br /&gt;  CGContextScaleCTM(context, -scaleRatio, scaleRatio);&lt;br /&gt;  CGContextTranslateCTM(context, -height, 0);&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  CGContextScaleCTM(context, scaleRatio, -scaleRatio);&lt;br /&gt;  CGContextTranslateCTM(context, 0, -height);&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; CGContextConcatCTM(context, transform);&lt;br /&gt; &lt;br /&gt; CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, width, height), imgRef);&lt;br /&gt; UIImage *imageCopy = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt; UIGraphicsEndImageContext();&lt;br /&gt; &lt;br /&gt; [self setRotatedImage:imageCopy];&lt;br /&gt; //return imageCopy;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/7918450973185564173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/10/rotating-image-with-bounds-unchanged.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/7918450973185564173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/7918450973185564173'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/10/rotating-image-with-bounds-unchanged.html' title='Rotating an image with bounds &amp; unchanged ratio'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2658118309637272135</id><published>2010-09-29T18:59:00.001+06:00</published><updated>2010-09-29T19:01:10.242+06:00</updated><title type='text'>Simple drawing through touches</title><content type='html'>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&lt;br /&gt;    &lt;br /&gt;    mouseSwiped = NO;&lt;br /&gt;    UITouch *touch = [touches anyObject];&lt;br /&gt;    &lt;br /&gt;    if ([touch tapCount] == 2) {&lt;br /&gt;        drawImage.image = nil;&lt;br /&gt;        return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    lastPoint = [touch locationInView:self.view];&lt;br /&gt;    lastPoint.y -= 20;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {&lt;br /&gt;    mouseSwiped = YES;&lt;br /&gt;    &lt;br /&gt;    UITouch *touch = [touches anyObject];   &lt;br /&gt;    CGPoint currentPoint = [touch locationInView:self.view];&lt;br /&gt;    currentPoint.y -= 20;&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    UIGraphicsBeginImageContext(self.view.frame.size);&lt;br /&gt;    [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];&lt;br /&gt;    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);&lt;br /&gt;    CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0);&lt;br /&gt;    CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);&lt;br /&gt;    CGContextBeginPath(UIGraphicsGetCurrentContext());&lt;br /&gt;    CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);&lt;br /&gt;    CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);&lt;br /&gt;    CGContextStrokePath(UIGraphicsGetCurrentContext());&lt;br /&gt;    drawImage.image = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt;    UIGraphicsEndImageContext();&lt;br /&gt;    &lt;br /&gt;    lastPoint = currentPoint;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {&lt;br /&gt;    &lt;br /&gt;    UITouch *touch = [touches anyObject];&lt;br /&gt;    &lt;br /&gt;    if ([touch tapCount] == 2) {&lt;br /&gt;        drawImage.image = nil;&lt;br /&gt;        return;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    if(!mouseSwiped) {&lt;br /&gt;        UIGraphicsBeginImageContext(self.view.frame.size);&lt;br /&gt;        [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];&lt;br /&gt;        CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);&lt;br /&gt;        CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0);&lt;br /&gt;        CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);&lt;br /&gt;        CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);&lt;br /&gt;        CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);&lt;br /&gt;        CGContextStrokePath(UIGraphicsGetCurrentContext());&lt;br /&gt;        CGContextFlush(UIGraphicsGetCurrentContext());&lt;br /&gt;        drawImage.image = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt;        UIGraphicsEndImageContext();&lt;br /&gt;    }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2658118309637272135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/simple-drawing-through-touches.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2658118309637272135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2658118309637272135'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/simple-drawing-through-touches.html' title='Simple drawing through touches'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-2867076100520474822</id><published>2010-09-28T17:10:00.000+06:00</published><updated>2010-09-28T17:11:30.990+06:00</updated><title type='text'>How to capture current screen through the app</title><content type='html'>-(IBAction)captureScreen:(id)sender&lt;br /&gt;{&lt;br /&gt; UIGraphicsBeginImageContext(webview.frame.size);&lt;br /&gt; [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];&lt;br /&gt; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt; UIGraphicsEndImageContext();&lt;br /&gt; UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/2867076100520474822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/how-to-capture-current-screen-through.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2867076100520474822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/2867076100520474822'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/how-to-capture-current-screen-through.html' title='How to capture current screen through the app'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-1656540706316305136</id><published>2010-09-21T23:12:00.000+06:00</published><updated>2010-09-21T23:14:34.532+06:00</updated><title type='text'>Selecting Photo from photo library through image picker</title><content type='html'>-(void)imagePickerController:(UIImagePickerController *)picker&lt;br /&gt;    didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{&lt;br /&gt; &lt;br /&gt; appDelegate.image = image;&lt;br /&gt; [picker dismissModalViewControllerAnimated:YES]; &lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/1656540706316305136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/selecting-photo-from-photo-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1656540706316305136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/1656540706316305136'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/selecting-photo-from-photo-library.html' title='Selecting Photo from photo library through image picker'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-8532337920429046696</id><published>2010-09-21T23:08:00.002+06:00</published><updated>2010-09-21T23:10:30.242+06:00</updated><title type='text'>Picking Image from camera or photo library</title><content type='html'>-(IBAction) camAction&lt;br /&gt;{&lt;br /&gt; if([UIImagePickerController isSourceTypeAvailable:&lt;br /&gt;  UIImagePickerControllerSourceTypeCamera]){&lt;br /&gt;  UIImagePickerController *picker=[[UIImagePickerController alloc] init];&lt;br /&gt;  picker.delegate=self;&lt;br /&gt;  picker.sourceType=UIImagePickerControllerSourceTypeCamera;&lt;br /&gt;  //picker.allowsImageEditing = YES;&lt;br /&gt;  picker.editing=YES;&lt;br /&gt;  [self presentModalViewController:picker animated:YES];  &lt;br /&gt;  [picker release];&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Error&quot; message:@&quot;This device does not have any camera.&quot;&lt;br /&gt;                delegate:self cancelButtonTitle:@&quot;Ok&quot; otherButtonTitles: nil];&lt;br /&gt;  [alert show]; &lt;br /&gt;  [alert release];&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-(IBAction) libraryAction&lt;br /&gt;{&lt;br /&gt; if([UIImagePickerController isSourceTypeAvailable:&lt;br /&gt;  UIImagePickerControllerSourceTypePhotoLibrary]){&lt;br /&gt;  UIImagePickerController *picker=[[UIImagePickerController alloc] init];&lt;br /&gt;  picker.delegate=self;&lt;br /&gt;  picker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;&lt;br /&gt;  //picker.allowsImageEditing = YES;&lt;br /&gt;  picker.editing=YES;&lt;br /&gt;  [self presentModalViewController:picker animated:YES];  &lt;br /&gt;  [picker release];&lt;br /&gt; }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/8532337920429046696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/picking-image-from-camera-or-photo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/8532337920429046696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/8532337920429046696'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/picking-image-from-camera-or-photo.html' title='Picking Image from camera or photo library'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8958307664040260034.post-3800628748154318921</id><published>2010-09-21T23:03:00.000+06:00</published><updated>2010-09-21T23:05:59.272+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="action sheet"/><category scheme="http://www.blogger.com/atom/ns#" term="getting image from album"/><title type='text'>Choosing Image through Action Sheet</title><content type='html'>-(IBAction)choosePictureButtonPressed&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; UIActionSheet *actionSheet = [[UIActionSheet alloc]&lt;br /&gt;          initWithTitle:nil&lt;br /&gt;          delegate:self&lt;br /&gt;          cancelButtonTitle:@&quot;Cancel&quot;&lt;br /&gt;          destructiveButtonTitle:nil&lt;br /&gt;          otherButtonTitles:@&quot;From Album&quot;,@&quot;Camera&quot;,nil];&lt;br /&gt; &lt;br /&gt; actionSheet.actionSheetStyle = UIActionSheetStyleDefault;&lt;br /&gt; actionSheet.cancelButtonIndex=2;&lt;br /&gt; [actionSheet showInView:self.view]; &lt;br /&gt; [actionSheet showInView:[[UIApplication sharedApplication] keyWindow]];&lt;br /&gt; [actionSheet release];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex&lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; if(buttonIndex==0)&lt;br /&gt; {&lt;br /&gt;  [self libraryAction];//:YES];&lt;br /&gt; }&lt;br /&gt; else if(buttonIndex == 1)&lt;br /&gt; {&lt;br /&gt;  [self camAction];//:YES];&lt;br /&gt; }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://erfan-ali-31.blogspot.com/feeds/3800628748154318921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/choosing-image-through-action-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3800628748154318921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8958307664040260034/posts/default/3800628748154318921'/><link rel='alternate' type='text/html' href='http://erfan-ali-31.blogspot.com/2010/09/choosing-image-through-action-sheet.html' title='Choosing Image through Action Sheet'/><author><name>Erfan</name><uri>http://www.blogger.com/profile/05355508844972148670</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>