Thursday, 1 October 2015

How To Work With Layer In Ios ? Iphone

==>How To Use Color With Layer With Method:

=> Take Expmale Of UIView On It Create CALyer And Give Some COlor On Add SubLayed :

-(void)addBlueLayer{
   
    CALayer *blueLayer =[CALayer layer];
    blueLayer.backgroundColor = [UIColor blueColor].CGColor;
    blueLayer.frame = CGRectMake(0, 0, 100, 100);
    [self.view.layer addSublayer:blueLayer];

}
==> Add Layer On It Sub Layer CAlayer add sublayer.
==> Using One Action it Use Changed Color Of it: