I'm creating a label with font size 0 and i want to enlarge it and at the same time to make it disappear. One important thing is that i want to adjust the label size and place to the center and the view(it can be iphone or ipad). In my code I have to begin with a big font size, to have other suggestions?
My code:
UILabel* swipeLabel = [[UILabel alloc] initWithFrame:self.view.frame];
[swipeLabel setText:NSLocalizedString(@"Swipe to change", @"Swipe label text")];
[swipeLabel setTextColor:[UIColor whiteColor]];
[swipeLabel setTextAlignment:UITextAlignmentCenter];
[swipeLabel setFont:[UIFont systemFontOfSize:2]];
[swipeLabel setAdjustsFontSizeToFitWidth:YES];
[swipeLabel setBackgroundColor:[UIColor clearColor]];
[swipeLabel setNumberOfLines:1];
[self.view addSubview:swipeLabel];
[UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionAllowAnimatedContent animations:^{
CGFloat scaleFactor = 10.0f;
swipeLabel.transform = CGAffineTransformMakeScale(scaleFactor, scaleFactor);
[swipeLabel setAlpha:0];
} completion:^(BOOL finished) {
}];
Thanks!