我想制作一个像多米诺骨牌一样落在彼此身上的动画,因为我想要一个标签向前倾斜,即落在另一个标签上(类似动画的效果)。我正在使用变换方法,但我不知道它是如何完成的。我对应该如何改变坐标感到困惑。
提前致谢。
- (IBAction)moveButtonAction:(UIButton *)sender
{
[UIView animateWithDuration:3 animations:^{
_brick1.transform =CGAffineTransformMake(_brick1.transform.a, _brick1.transform.b+5 , _brick1.transform.c , _brick1.transform.d, _brick1.transform.tx, _brick1.transform.ty);
}];
}
答案 0 :(得分:-1)
class Program
{
public static void Main()
{
Number n = new Number();
IOne one = n.GetNumberObject<One>();
one.PrintOne();
ITwo two = n.GetNumberObject<Two>();
two.PrintTwo();
}
public interface INumbers
{
T GetNumberObject<T>() where T : new();
}
public class Number : INumbers
{
public T GetNumberObject<T>() where T : new()
{
return new T();
}
}
public interface IOne
{
void PrintOne();
}
public interface ITwo
{
void PrintTwo();
}
class One : IOne
{
public void PrintOne()
{
Console.WriteLine("One");
}
}
class Two : ITwo
{
public void PrintTwo()
{
Console.WriteLine("Two");
}
}
}
在视图图层上应用一些3D变换。