We can test by device iOS version will support this feature or not. But, we can upgrade the iOS version to 3G devices also, it doesn't have Front camera. So, the simple way to test the application is given below, it help us to validate the feature.
BOOL val = [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"facetime://5555555555"]];
NSLog((val)?@"Yes":@"NO");
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:(val)?@"Yes":@"No" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
if(val){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"facetime://5555555555"]];
}
Thursday, December 22, 2011
Phone Contacts backup in MAC using BT
I was searching for the solution how to backup my phone contacts saved most of the contacts in the phone memory. When I google it gives only the paid solution. But, I want simple free approach.
Nothing, What I did is just exported my phone contacts as vcf (electonic business card file) to my system using BT (Bluetooth).
Even, if you created contacts in the mac machine contacts application. It can be exported as vcf and send back to mobile device to restore/add contact.
What else! That's all we are done with backing up with our mobile contacts.
Mobile Device Used: Samsung Star - s5233
Nothing, What I did is just exported my phone contacts as vcf (electonic business card file) to my system using BT (Bluetooth).
Even, if you created contacts in the mac machine contacts application. It can be exported as vcf and send back to mobile device to restore/add contact.
What else! That's all we are done with backing up with our mobile contacts.
Mobile Device Used: Samsung Star - s5233
Wednesday, December 21, 2011
Customizing the TabBar images in iOS
Here is the sample code for you how to customize the tabbar in iphone. It will do with four stripe of images.
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
NSUInteger selectedIndex = tabBarController.selectedIndex;
NSString *selectedImage;
switch (selectedIndex) {
case 0:
selectedImage = @"menu_selected.png";
break;
case 1:
selectedImage = @"location_selected.png";
break;
case 2:
selectedImage = @"offers_selected.png";
break;
case 3:
selectedImage = @"reviews_selected.png";
break;
default:
break;
}
UIImage *image = [UIImage imageNamed:selectedImage];
UIImageView *imageView = [[ UIImageView alloc ] initWithFrame:CGRectMake(0,440,320,40) ];
imageView.image = image;
[self.tabBarController.view addSubview:imageView];
}
Added: Source will do SKTabBar usage
Source: download
Tuesday, December 20, 2011
Restoration of backup SVN repository
The below steps executed in Snow Leopord OS:
SVN repo restoration steps in the existing environment:
- Copy your project repo under main repositiory directory in path /usr/local/main_repo/your_repo
- add/copy user in etc/users file if not exists
- add/copy authz group or user for the repo project in etc/authz
- verify all the paths in path etc/apache2/extra/httpd-svn.conf
Related:
For the New SVN setup details refer here.
Friday, December 16, 2011
Custom ScrollableTabBar (UIButtons) for iOS
One of my Project I need to build scrollable buttons/tab bar in the page. So, idea comes with this solutions.
How to call the SKTabBar class:
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
CGSize buttonSize = CGSizeMake(50,60);
SKTabBar *skTB =[[SKTabBar alloc]initWithFrame:CGRectMake(0,100,320,100)];
[skTB setBackgroundColor:[UIColor grayColor]];
[skTB setShowsVerticalScrollIndicator:NO];
[skTB setSkDelegate:self];
[skTB loadTabs:buttonSize numberOfTabs:36];
[self.view addSubview:skTB];
[super viewDidLoad];
}
-(void)getSelectedButtonTab:(id)sender{
UIButton *btn = (UIButton*)sender;
NSLog(@"%d",btn.tag);
}
Updated:
Added animations code snippets to show the zoomed view of selected button on selection.
Source: download
Wednesday, December 14, 2011
How to build Static Library project in iOS
Reference:
http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/
http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/#namespace_classes_appropriately
Video:
http://www.youtube.com/watch?v=fFn2o0aEbRQ
http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/
http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/#namespace_classes_appropriately
Video:
http://www.youtube.com/watch?v=fFn2o0aEbRQ
Subscribe to:
Posts (Atom)