V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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
xiaoyu9965
V2EX  ›  iDev

求助一个诡异的问题!!!

  •  
  •   xiaoyu9965 · 2015-10-15 23:41:14 +08:00 · 2117 次点击
    这是一个创建于 3109 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 AFSoundManager 中,无法在播放队列中修改 UI,不然会修改掉,界面上 UI 的 anchorPoint 。
    例如代码:
    playQueue = AFSoundQueue.init(items: [item1,item2,item3,item4,item5,item6])
    playQueue.pause()
    playQueue.listenFeedbackUpdatesWithBlock({aFSoundItem in

    self.palyProgress.setProgress(Float(aFSoundItem.timePlayed)/Float(aFSoundItem.duration), animated: true)
            let playText = String(aFSoundItem.timePlayed)+"/"+String(aFSoundItem.duration)
            self.playTime.text = playText
    
            }, andFinishedBlock: { nextAFSoundItem in
    
                //print(nextAFSoundItem.title)
    
        })
    

    就会很诡异的修改了界面上 UI 的 anchorPoint 。

    4 条回复    2015-10-16 13:14:35 +08:00
    sparanoid
        1
    sparanoid  
    MOD
       2015-10-15 23:44:50 +08:00
    请勿多节点重复发贴,其他的主题已删除
    xiaoyu9965
        2
    xiaoyu9965  
    OP
       2015-10-15 23:46:28 +08:00
    @sparanoid 不是有意的,理解下解 BUG 的心情~~~~
    jesse_luo
        3
    jesse_luo  
       2015-10-16 12:48:46 +08:00
    dispatch 到 main_queue 试试?
    xiaoyu9965
        4
    xiaoyu9965  
    OP
       2015-10-16 13:14:35 +08:00
    @jesse_luo 也试过在主线程中去更新 UI ,但是问题依然没有解决.......=。=
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2955 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:34 · PVG 11:34 · LAX 20:34 · JFK 23:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.