Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/93.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何将UILabel从小变为其原始大小?_Ios_Objective C_Uilabel_Uianimation - Fatal编程技术网

Ios 如何将UILabel从小变为其原始大小?

Ios 如何将UILabel从小变为其原始大小?,ios,objective-c,uilabel,uianimation,Ios,Objective C,Uilabel,Uianimation,事实上,我正在我的应用程序中使用RESlider。在菜单表视图中有一个配置文件图像,除此之外还有一个通知标签。现在我想要的是,当用户按下汉堡包菜单时,通知标签(带有999号的橙色标签)应该从一个小点变为其原始大小。如何做到这一点?? 更改标签的变换比例,如下所示: [UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOp

事实上,我正在我的应用程序中使用RESlider。在菜单表视图中有一个配置文件图像,除此之外还有一个通知标签。现在我想要的是,当用户按下汉堡包菜单时,通知标签(带有999号的橙色标签)应该从一个小点变为其原始大小。如何做到这一点??
更改标签的变换比例,如下所示:

[UIView animateWithDuration:0.5
                          delay:0.0
                        options:UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveEaseInOut
                     animations:^{
                         timerLabel.transform = CGAffineTransformScale(timerLabel.transform, 0.7, 0.7);
                     }
                     completion:nil];

把这个放在视图中

-(void)viewDidAppear:(BOOL)animated{
     self.label.transform = CGAffineTransformMakeScale(0.01, 0.01);
    [UIView animateWithDuration:0.5 animations:^{
        self.label.transform = CGAffineTransformIdentity;
    } completion:^(BOOL finished) {

    }];
}

与其他解决方案不同,这一循环将
self.label.transform=CGAffineTransformMakeScale(1.0,1.0)
更改为
self.label.transform=CGAffineTransformIdentity
-(void)viewDidAppear:(BOOL)animated{
     self.label.transform = CGAffineTransformMakeScale(0.01, 0.01);
    [UIView animateWithDuration:0.5 animations:^{
        self.label.transform = CGAffineTransformIdentity;
    } completion:^(BOOL finished) {

    }];
}