My Blog List

Android FirstAid Coding

A Small Help From a Small Heart
Powered by Blogger.

A software professional, who still likes to code, likes to blog and loves gadgets.

Saturday 7 September 2013

Back to Application after end of the call in iPhone

 

By using openURL we can make phone call from our app.


Problem:


It takes the users to the default Phone application after end of the call. But the users needs to go back to the app after end of the call.


Solution


NSString *phFormat=[NSString stringWithFormat:@"telprompt://0123456789"];           
[UIApplication sharedApplication] openURL:[NSURL URLWithString:phFormat]];

Splash Screen Animation on iPhone

How to show splash screen in iphone with a animation
 

AppDelegate.m
==============
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:viewController.view];
[window makeKeyAndVisible];
[NSTimer scheduledTimerWithTimeInterval:1.0/30. target:self selector:@selector(splashScreen) userInfo:nil repeats:NO];

}

- (void) splashScreen
{
//Welcome Screen
UIImageView* welcome = [[[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)]autorelease];
welcome.image = [UIImage imageNamed:@"myimage.png"];
[window addSubview:welcome];
[window bringSubviewToFront:welcome];
//Animation Effects (zoom and fade)
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2.0];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
[UIView setAnimationDelegate:welcome];
[UIView setAnimationDidStopSelector:@selector(removeFromSuperview)];

//set transparency to 0.0
welcome.alpha = 0.0;

//zoom effect
welcome.frame = CGRectMake(-60, -60, 440, 600);
[UIView commitAnimations];

}