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
satanwoo
V2EX  ›  iDev

照着 StoreHouse 撸了一个 tableview 的效果。

  •  
  •   satanwoo · Mar 1, 2015 · 3180 views
    This topic created in 4117 days ago, the information mentioned may be changed or developed.
    第一次写Swift,试试看,不知道自己的写法正确不正确,大家有兴趣看的话指点一下那是最好不过了。

    效果如下:
    <img src = "">

    实现如下的一个变量和方法即可,如:
    var miniumScale:CGFloat = 0.85;
    func transformCell(forScale scale: CGFloat) {
    self.scaleView.transform = CGAffineTransformMakeScale(1.0 - scale, 1.0 - scale);
    }
    Supplement 1  ·  Mar 1, 2015
    附上github地址:https://github.com/SatanWoo/WZStoreHouseTableView
    4 replies    2015-03-15 23:21:09 +08:00
    Elethom
        1
    Elethom  
       Mar 1, 2015
    隨便看了下,感覺不怎麼用心。
    比如語法上 constant 應該是用 let declare 的;還有 Swift 的特性也沒用上,如 string interpolation,完全可以這樣寫:
    cell.photoImageView.image = UIImage(named: "\(indexPath.row % 2 + 1)")
    Motion 用 linear 肯定效果不好,而且 Storehouse 是非實時 transform。
    satanwoo
        2
    satanwoo  
    OP
       Mar 1, 2015 via iPhone
    @Elethom 恩 刚上手 不太熟 你说的有道理
    satanwoo
        3
    satanwoo  
    OP
       Mar 1, 2015 via iPhone
    @Elethom 还有啥叫非实时transform?不太理解
    hst
        4
    hst  
       Mar 15, 2015
    用OC再来一个呗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3016 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 14:44 · PVG 22:44 · LAX 07:44 · JFK 10:44
    ♥ Do have faith in what you're doing.