Posts

Showing posts from April, 2012

Adding an UITextField to an UIAlertView in iPhone / iOS application

As we all know, UIAlertView is subclassed from UIView, its possible to add sub views to the alert view. Today, we will try to add an text field to UIAlertView. The code is attached below.     UIAlertView *alert = [[ UIAlertView alloc ] initWithTitle : @"See the text field below"     message : @"this gets covered!\n"   delegate : self cancelButtonTitle : @"Dismiss" otherButtonTitles : @"OK" , nil ];      alert. tag  = 1 000 ;            UITextField *_textField = [[ UITextField alloc ] initWithFrame : CGRectMake ( 12 , 45 , 260 , 25 )];     [_textField  setPlaceholder : @"Place holder text" ];     _textField. tag = 1 00 ;     _textField. clearButtonMode = UITextFieldViewModeWhileEditing ;     [_textField  setBackgroundColor :[ UIColor whiteColor ]];     [_textField  becomeFirstResponder ];     [alert addSubview : _textField];     [_textField  release ];     [alert show ];     [alert release ]; And to get the value of

Integrating ZXing QR Code reader in iPhone / iOS applications

I spent a lot of time in integrating the QR code reader in iOS applications. I like to share you the steps and let you know the basic bugs that may happen during the integration process and how to debug that too :) Step 1  Download the latest code for QR code reader, zxing framework from github here . Step 2  Drag and drop the ZXingWidget.xcodeproj file to your project. Step 3  Copy the cpp folder from downloaded files (zxing-2.0) to your project. (The download files (zxing-2.0) depends upon the version that has been downloaded from github.) Step 4  Copy the iphone folder from downloaded files (zxing-2.0) to your project. (The download files (zxing-2.0) depends upon the version that has been downloaded from github.) Step 5 Add the following frameworks to your project.  Click on Project name -> Target -> Build Phases -> Link with libraries AudioToolbox.framework AddressBookUI.framework AddressBook.framework CoreVideo.framework CoreMedia.framework AVFoundati

Transparent UIWebView in iPhone application

Hi Folks, Today, lets try to implement a transparent web view in our iphone application. Its quite simple and easy to use. 1. Set the background color of UIWebView to clear color. [myWebView setBackgroundColor:[UIColor clearColor]]; 2. Set the Opaque property of the UIWebView to NO.  myWebView.opaque = NO; 3.  Set the html page, body background property in style to transparent.  You can refer the above mentioned settings given in Apple Sample code, TransWeb .

Transparent UIWebView in iPhone application

Hi Folks, Today, lets try to implement a transparent web view in our iphone application. Its quite simple and easy to use. 1. Set the background color of UIWebView to clear color. [myWebView setBackgroundColor:[UIColor clearColor]]; 2. Set the Opaque property of the UIWebView to NO.  myWebView.opaque = NO; 3.  Set the html page, body background property in style to transparent.  You can refer the above mentioned settings given in Apple Sample code, TransWeb .