Thursday 13 June 2013

3. Set Transparent color and font for label

To set transparent label use the following lines in your codes:

UILabel *label;


label.backgroundColor = [UIColor clearColor];

To set Font sie of the label test 

 label.font= [UIFont systemFontOfSize:50.0];

 label.textAlignment=NSTextAlignmentCenter;

For more details : click here

Thursday 6 June 2013

2. NSNotificationCenter to get native events alert

This helps to get know about NSNotificationCenter.
We can register the events notifications via NSNotificationCenter, when the event trigger then notification center will send the notification for corresponding events.
Register using the following lines of code:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(customFunction) name:UIApplicationDidEnterBackgroundNotification object:nil];
//name is a NSString you can give available events in xcode 
Then when the app did entered background it will call the below customFunction funtion
-(void) customFunction
{
// custom code
NSLog(@"Application enter into background");
}


Tuesday 4 June 2013

1. Hide Status bar

To hide status bar use the following command:

[[UIApplication sharedApplication] setStatusBarHidden:YES];
the default value of this property is NO

This wont hide the status bar at the launch image
To hide status bar in launch image set Status bar is initially hidden to YES in info.plist