iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
Pasco
V2EX  ›  iDev

facebook 的 pop 中的 kPOPLayerPositionX

  •  
  •   Pasco · Feb 14, 2016 · 3382 views
    This topic created in 3765 days ago, the information mentioned may be changed or developed.

    myLabel 使用动画

    POPSpringAnimation *anim1 = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionX];
    anim1.springBounciness = 20;
    anim1.toValue = @100;
    anim1.velocity = @400;
    [self.myLabel.layer pop_addAnimation:anim1 forKey:@"positionAnimation"];

    动画完成后,我点击了一个 UItextfield ,然后 myLabel 的位置又回到原来的位置了。
    什么情况啊这是 0.0.
    咋解决呢。
    其他的什么旋转啊,拉伸啊的动画都正常

    2 replies    2016-02-19 23:49:41 +08:00
    doluvor
        1
    doluvor  
       Feb 16, 2016   ❤️ 1
    点击 UITextField 会触发 Autolayout 的更新,看看是否在 myLabel 上添加了位置的约束。
    如果有约束需要使用 pop 的 kPOPLayoutConstraintConstant 的 animation ,然后添加到约束上。
    Pasco
        2
    Pasco  
    OP
       Feb 19, 2016
    @doluvor 太感谢了!解决了我好几天的困惑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2956 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:17 · PVG 12:17 · LAX 21:17 · JFK 00:17
    ♥ Do have faith in what you're doing.