utilisation animation simple erreur

yodarkyodark Membre
22:59 modifié dans API UIKit #1
salut a tous,


J'ai essayé de faire une animation de transition simple mais j'obtiens une erreur que je ne comprends pas


Undefined symbols:<br />&nbsp; &quot;_kCATransitionPush&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; _kCATransitionPush$non_lazy_ptr in SplashViewController.o<br />&nbsp; &quot;.objc_class_name_CAMediaTimingFunction&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; literal-pointer@__OBJC@__cls_refs@CAMediaTimingFunction in SplashViewController.o<br />&nbsp; &quot;_kCAMediaTimingFunctionEaseInEaseOut&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; _kCAMediaTimingFunctionEaseInEaseOut$non_lazy_ptr in SplashViewController.o<br />&nbsp; &quot;_kCATransitionFromTop&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; _kCATransitionFromTop$non_lazy_ptr in SplashViewController.o<br />&nbsp; &quot;_kCATransition&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; _kCATransition$non_lazy_ptr in SplashViewController.o<br />&nbsp; &quot;.objc_class_name_CATransition&quot;, referenced from:<br />&nbsp; &nbsp; &nbsp; literal-pointer@__OBJC@__cls_refs@CATransition in SplashViewController.o<br />ld: symbol(s) not found<br />collect2: ld returned 1 exit status<br /><br />




mon code

CATransition * animation = [CATransition animation];<br />&nbsp; &nbsp;  [animation setDelegate:self];<br />&nbsp; &nbsp;  animation.type = kCATransitionPush ;<br />&nbsp; &nbsp;  animation.subtype = kCATransitionFromTop;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; [animation setDuration:2.0];<br />&nbsp; &nbsp; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];<br /><br />&nbsp; &nbsp;  // On lance l&#39;animation<br />&nbsp; &nbsp;  [self.view.layer addAnimation:animation forKey:kCATransition];<br />&nbsp; &nbsp;  NSLog(@&quot;Start application&quot;);<br />&nbsp; &nbsp;  <br />&nbsp; &nbsp;  // Add the tab bar controller&#39;s current view as a subview of the window<br />&nbsp; &nbsp;  [self.view addSubview:tabBarController.view];


Que faire pour lancer l'animation ? C'est faux ?

Réponses

  • Philippe49Philippe49 Membre
    22:59 modifié #2
    As-tu inclus les bibliothèques ad hoc , dans le projet, dans le .m ?
  • Philippe49Philippe49 Membre
    22:59 modifié #3
    Les indices sont multiples

    dans 1229966508:


    Undefined symbols:
      "_kCATransitionPush", referenced from:
     ....
    "ld: symbol(s) not found"
    collect2: ld returned 1 exit status



    "undefined symbols" : à  la compilation, il n'est pas trouvé dans le projet de définition pour kCATransitionPush (et les autres)

    "ld: symbol(s) not found" : Même problème lors de la phase "édition de lien".

  • yodarkyodark Membre
    22:59 modifié #4
    En effet j'avais bien importé
    <br />#import &lt;QuartzCore/QuartzCore.h&gt;<br />#import &lt;CoreGraphics/CoreGraphics.h&gt;
    


    Mais les frameworks n'étaient pas inclus dans le projet
    Merci
Connectez-vous ou Inscrivez-vous pour répondre.