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

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

  •  
  •   satanwoo · 2015-03-01 10:08:44 +08:00 · 2586 次点击
    这是一个创建于 3343 天前的主题,其中的信息可能已经有所发展或是发生改变。
    第一次写Swift,试试看,不知道自己的写法正确不正确,大家有兴趣看的话指点一下那是最好不过了。

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

    实现如下的一个变量和方法即可,如:
    var miniumScale:CGFloat = 0.85;
    func transformCell(forScale scale: CGFloat) {
    self.scaleView.transform = CGAffineTransformMakeScale(1.0 - scale, 1.0 - scale);
    }
    第 1 条附言  ·  2015-03-01 11:32:32 +08:00
    附上github地址:https://github.com/SatanWoo/WZStoreHouseTableView
    4 条回复    2015-03-15 23:21:09 +08:00
    Elethom
        1
    Elethom  
       2015-03-01 13:16:18 +08:00
    隨便看了下,感覺不怎麼用心。
    比如語法上 constant 應該是用 let declare 的;還有 Swift 的特性也沒用上,如 string interpolation,完全可以這樣寫:
    cell.photoImageView.image = UIImage(named: "\(indexPath.row % 2 + 1)")
    Motion 用 linear 肯定效果不好,而且 Storehouse 是非實時 transform。
    satanwoo
        2
    satanwoo  
    OP
       2015-03-01 14:51:46 +08:00 via iPhone
    @Elethom 恩 刚上手 不太熟 你说的有道理
    satanwoo
        3
    satanwoo  
    OP
       2015-03-01 14:54:18 +08:00 via iPhone
    @Elethom 还有啥叫非实时transform?不太理解
    hst
        4
    hst  
       2015-03-15 23:21:09 +08:00
    用OC再来一个呗
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2536 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 16:11 · PVG 00:11 · LAX 09:11 · JFK 12:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.