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

安利下用 Swift 仿写的微信客户端,有兴趣的可以看下

  •  
  •   hilenlai · Mar 4, 2016 · 7468 views
    This topic created in 3902 days ago, the information mentioned may be changed or developed.

    地址: https://github.com/hilen/TSWeChat
    预览图:
    preview1
    preview1

    44 replies  •  2016-03-11 14:38:50 +08:00
    qqzj
    qqzj
    Mar 4, 2016
    1
    厉害,就是那些标题都硬编码了,不便于做国际化啊
    hustlzp
    hustlzp
    Mar 4, 2016
    2
    好东西,值得参考
    lincanbin
    lincanbin
    Mar 4, 2016
    3
    UI ?还是带后台的?
    run2
    run2
    Mar 4, 2016
    4
    QR 的话这个貌似可以
    https://github.com/liufan321/SwiftQRCode

    用的 iOS 内置的 所以应该是的 8.0 以上版本
    EPCoo
    EPCoo
    Mar 4, 2016
    5
    看起来不错,已 Star !
    bozong
    bozong
    Mar 4, 2016
    6
    怎么安装
    matsuijurina
    matsuijurina
    Mar 4, 2016
    7
    Readme 里面的 deposit 多打了一个 e 。
    zacard
    zacard
    Mar 4, 2016
    8
    已 star ,说明也很详细,有空来学习下。
    wohenyingyu01
    wohenyingyu01
    Mar 4, 2016
    9
    呃,.../GitProjects/TSWeChat/TSWeChat/Supportting Files/TSWeChat-Bridging-Header.h:11:9: 'SVProgressHUD/SVProgressHUD.h' file not found ?
    MScZJN
    MScZJN
    Mar 4, 2016
    10
    @wohenyingyu01 同样的问题
    lxian2
    lxian2
    Mar 4, 2016
    11
    先 star 一下~
    metrue
    metrue
    Mar 4, 2016
    12
    聊天是什么协议?
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    13
    @matsuijurina 😂,我回头改一下,好仔细。这都发现了
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    14
    @qqzj 是的,现在页面比较少,我就写死了。 后续考虑国际化会统一处理 :)
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    15
    @metrue 仅实现了 UI 和交互, 数据层面是本地的 JSON 文件
    ynyounuo
    ynyounuo
    Mar 4, 2016
    16
    @wohenyingyu01
    @MScZJN
    通过 TSWeChat.xcworkspace 再 build
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    17
    @wohenyingyu01 @MScZJN
    CocoaPods 的版本是?
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    18
    @lincanbin 不带后台的,后续可能会加一些第三方的 IM :)
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    19
    @sobigfish 好的,多谢 :)
    MScZJN
    MScZJN
    Mar 4, 2016
    20
    @hilenlai 你好 0.39.0
    wohenyingyu01
    wohenyingyu01
    Mar 4, 2016
    21
    @hilenlai 没有装 cocoapod ,但是可以正常运行, cocoapod 似乎只是帮助管理导入其他项目而已,实际编译并不需要。(从来没用过 xocde 的 workspace 所以刚刚直接无视了= =)
    sokis
    sokis
    Mar 4, 2016
    22
    Star
    hahasong
    hahasong
    Mar 4, 2016
    23
    好逼真的样子 star
    EugeneQiu
    EugeneQiu
    Mar 4, 2016
    24
    cool star
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    25
    @wohenyingyu01
    看看是不是跑错文件了

    @MScZJN
    好吧,我在上传项目的时候直接把 pods 的源文件也上传了。 Enjoy
    johnmuu
    johnmuu
    Mar 4, 2016❤️1
    26
    Star 拿去!~
    NxiJSiOS
    NxiJSiOS
    Mar 4, 2016
    27
    你好,问一个问题:为什么写含有图片的 Cell 。要添加一个图片盖在上面。
    let stretchConverImage = model.fromMe ? TSAsset.SenderImageNodeBorder.image : TSAsset.ReceiverImageNodeBorder.image
    let bubbleConverImage = stretchConverImage.resizableImageWithCapInsets(stretchInsets, resizingMode: .Stretch)
    self.coverImageView.image = bubbleConverImage
    self.coverImageView.frame = CGRectMake(
    self.chatImageView.left - 1,
    self.chatImageView.top,
    self.chatImageView.width + 2,
    self.chatImageView.height + 2
    )
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    28
    @NxiJSiOS 因为如果你截屏微信,放到最大看,或者使用越狱设备查看 微信,你就发现图片周围是有一个边的,也就是有一个 UIImageView. 这个边是用来轮廓图片使用的,我猜微信的设计是为了防止改变聊天背景图时,发松的图片的轮廓和背景图格格不入吧。所以就加上了这个 cover
    NxiJSiOS
    NxiJSiOS
    Mar 4, 2016
    29
    发送的图片的轮廓和背景图格格不入?为什么会格格不入,我发现,好像 Yep ,和 JSQ 都好像有添加一个 imageView 盖在上面,就是不太明白。
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    30
    @NxiJSiOS 我猜测是设计原因吧,可能微信的设计师要求这样的 😂 。你可以尝试把 cover 去掉,然后再看看效果。 另外还可以看下微信的 resources 文件,里面是有这个 cover 图片的
    NxiJSiOS
    NxiJSiOS
    Mar 4, 2016
    31
    thx
    yxaaa123
    yxaaa123
    Mar 4, 2016
    32
    github 上有人用 oc 写了个还挺好的,我用 swift 写了一下。。。还没写完
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    33
    @yxaaa123 加油加油
    zonghua
    zonghua
    Mar 4, 2016
    34
    高仿至极,呼之欲出。有没有类似 React 的高仿?
    hilenlai
    hilenlai
    OP
    Mar 4, 2016
    35
    @zonghua 这个不晓得,可以探索探索
    allenforrest
    allenforrest
    Mar 4, 2016
    36
    @NxiJSiOS @hilenlai 因为图片本身一般是矩形的,但是消息 cell 是有特殊形状的,可能是圆角矩形,也能是带小尾巴的气泡,显示效果上要把图片完美嵌入消息 cell 里面,图片边缘会被消息 cell 的圆角矩形轮廓或者小尾巴气泡轮廓扣掉,因此需要一张 cover 图和原图做 mask 。
    Youthink
    Youthink
    Mar 4, 2016
    37
    安利是啥?
    hilenlai
    hilenlai
    OP
    Mar 4, 2016 via iPhone
    38
    @Youthink 你没有被推销过么?
    @allenforrest 解释的很赞👍🏻
    loveuqian
    loveuqian
    Mar 4, 2016
    39
    有 OC 版嘛
    hilenlai
    hilenlai
    OP
    Mar 4, 2016 via iPhone
    40
    @loveuqian 没有🙄
    crystom
    crystom
    Mar 4, 2016
    41
    厉害,收藏起来 等学完 oc 再来学 swift ,嘿嘿
    ijimmy
    ijimmy
    Mar 5, 2016 via iPhone
    42
    看上去不错
    XXdandan
    XXdandan
    Mar 11, 2016
    43
    恩恩,不错。。我用 oc 写了个类似的。。待我把后台也搭建好了,再开源下。
    hilenlai
    hilenlai
    OP
    Mar 11, 2016
    44
    @XXdandan 期待 😉
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2274 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 163ms · UTC 13:48 · PVG 21:48 · LAX 05:48 · JFK 08:48
    ♥ Do have faith in what you're doing.