6
Şu anda iOS geliştirmeye çalışıyorum. Bir rect görünümü eklediğimde ve yerçekimi tarafından etkilenmesini istediğimde, test uygulamamı ve çalıştırdığımda, bunun yerçekimi olmadığını görüyorum.UIKit Dynamics neden çalışmıyor?
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIView *squre = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
squre.backgroundColor = [UIColor grayColor];
[self.view addSubview:squre];
UIDynamicAnimator *_animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
UIGravityBehavior *_gravity = [[UIGravityBehavior alloc] initWithItems:@[squre]];
[_animator addBehavior:_gravity];
OH EVET, TEŞEKKÜRLER ~ –