Featured Post

Webview resizes automatically to portrait and landscape view in iphone 0

Webview resizes automatically to portrait and landscape view in iphone

contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);self.view = contentView;self.view.autoresizesSubviews = YES;CGRect webFrame = [[UIScreen mainScreen] applicationFrame];webFrame.origin.y -= 20.0;webView = [[UIWebView alloc] initWithFrame:webFrame];[contentView addSubview:webView]; webView.scalesPageToFit = YES;webView.autoresizesSubviews = YES;webView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);[webView...

Add images to bar button item in iphone 0

Add images to bar button item in iphone

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];[button setImage:[UIImage imageNamed:@"myImage.png"] forState:UIControlStateNormal];[button addTarget:self action:@selector(blah) forControlEvents:UIControlEventTouchUpInside];[button setFrame:CGRectMake(0, 0, 32, 32)];self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];

programmatically create Email option  in iPhone 0

programmatically create Email option in iPhone

#import <MessageUI/MFMailComposeViewController.h> On iOS 3.0 and later you should use the MFMailComposeViewController class, and the MFMailComposeViewControllerDelegate protocol, that that tucked away in the MessageUI framework.First add the framework and import: #import <MessageUI/MFMailComposeViewController.h>   Then,...

Images Display in GridView on IPhone 0

Images Display in GridView on IPhone

This is the GridView application. In this application we will see how to programatically images display in Gridview on iPhone . This is the GridView application. In this application we will see how to...

Take Picture from Camera & saved in Photo Gallery by programmatically 1

Take Picture from Camera & saved in Photo Gallery by programmatically

  You would use uiimagepickercontroller for this purpose. First of all, import the MobileCoreServices.framework. Then pull up the camera: if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { NSArray *media = [UIImagePickerController availableMediaTypesForSourceType: UIImagePickerControllerSourceTypeCamera]; if ([media containsObject:(NSString*)kUTTypeImage] == YES) { UIImagePickerController...

How to check for an active Internet Connection on iPhone SDK? 0

How to check for an active Internet Connection on iPhone SDK?

-(void) viewWillAppear:(BOOL)animated { // check for internet connection [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkNetworkStatus:) name:kReachabilityChangedNotification object:nil]; internetReachable = [[Reachability reachabilityForInternetConnection] retain]; [internetReachable startNotifier]; // check if a pathway to a random host exists hostReachable = [[Reachability...

JSON Over HTTP On The iPhone 0

JSON Over HTTP On The iPhone

This tutorial provides a step-by-step howto for consuming JSON web services from an iPhone app. When you’ve finished the tutorial you’ll have created a simple, back-of-a-fortune-cookie inspired, “Lucky Numbers” app with a solitary label...

iPhone Programming Tutorial – Intro to SOAP Web Services 0

iPhone Programming Tutorial – Intro to SOAP Web Services

Important Links: [WebService] http://viium.com/WebService/HelloWorld.asmx http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html http://developer.apple.com/documentation/Cocoa/Conceptual/XMLParsing/XMLParsing.html http://www.w3schools.com/soap/default.asp -After creating our XML data / SOAP request, we create a URLRequest. We add HTTP Header values, those values you read from the WebService. -We set the...

iOS SDK: UIAlertView Custom Graphics 1

iOS SDK: UIAlertView Custom Graphics

The UIAlertView class is easy to implement, but unless you get under the hood and tinker around it will look the same each time. This Quick Tip shows you how to create custom graphics...

Add done button to number pad in iphone 0

Add done button to number pad in iphone

If you have ever written an iPhone app that requires numeric input, then you surely know about the UIKeyboardTypeNumberPad. And if you have ever used that flavor of the iPhone’s keyboard, then you surely...

Email validation on textField in iPhone 0

Email validation on textField in iPhone

Use NSPredicate and Regex: – (BOOL)validateEmailWithString:(NSString*)email{    NSString *emailRegex = @”[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}”;     NSPredicate *emailTest = [NSPredicate predicateWithFormat:@”SELF MATCHES %@”, emailRegex];     return [emailTest evaluateWithObject:email];}   For a bunch of emails separated by...