Swift實戰-豆瓣電台(七)顯示動畫


 

youku觀看地址http://v.youku.com/v_show/id_XNzMxODQzNDIw.html

這是一個很酷的動畫效果。特別是數據多的時候

知識點

在單元格(Cell)顯示方法中設置動畫

 

func tableView(tableView: UITableView!, willDisplayCell cell: UITableViewCell!, forRowAtIndexPath indexPath: NSIndexPath!){
        cell.layer.transform = CATransform3DMakeScale(0.1, 0.1, 1)
        UIView.animateWithDuration(0.25, animations: {
            cell.layer.transform=CATransform3DMakeScale(1, 1, 1)
            })
}

willDisplayCell 顧名思義。就是在Cell顯示之前。

設置cell的層(layer)的變換(transform)為CATransform3DMakeScale做一個縮放動畫。X,y方向的縮放從0.1到1

 

高清視頻與代碼下載地址

http://pan.baidu.com/s/1sjHd5qX

 

Swift實戰-豆瓣電台系列

Swift實戰-豆瓣電台(一)准備

Swift實戰-豆瓣電台(二)界面布局

Swift實戰-豆瓣電台(三)獲取網絡數據

Swift實戰-豆瓣電台(四)歌曲列表的展現

Swift實戰-豆瓣電台(五)播放音樂

Swift實戰-豆瓣電台(六)視圖跳轉,傳參及回跳


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM