美文网首页
NSEnumerator 和 UIInterpolatingMo

NSEnumerator 和 UIInterpolatingMo

作者: zhao1zhihui | 来源:发表于2018-05-23 11:39 被阅读10次
     UIInterpolatingMotionEffect *motionEffect; motionEffect = [[UIInterpolatingMotionEffect alloc]initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; 
    motionEffect.minimumRelativeValue = @(-25); 
    motionEffect.maximumRelativeValue = @(25);
     [messageLabel addMotionEffect:motionEffect];
     motionEffect = [[UIInterpolatingMotionEffect alloc]initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; 
    motionEffect.minimumRelativeValue = @(-25); 
    motionEffect.maximumRelativeValue = @(25); 
    [messageLabel addMotionEffect:motionEffect];
    
    NSEnumerator *enumerator = [array reverseObjectEnumerator];  
            id obj = nil;  //不确定数组里面具体对象的类型,所以定义成id 类型指针  
            while (obj = [enumerator nextObject]) { //通过枚举器,取数组里面的每一个元素  
                NSLog(@"%@", obj);                  //将元素赋给 obj, 直到数组结束  
                                                    //取到的结果为nil,退出while  
            }  
    

    相关文章

      网友评论

          本文标题:NSEnumerator 和 UIInterpolatingMo

          本文链接:https://www.haomeiwen.com/subject/prcrjftx.html