V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
banxi1988
V2EX  ›  Xcode

Xcode 7 新特性讨论贴

  •  
  •   banxi1988 · 2015-06-09 10:20:51 +08:00 · 6995 次点击
    这是一个创建于 3242 天前的主题,其中的信息可能已经有所发展或是发生改变。

    见: http://adcdownload.apple.com/WWDC_2015/Xcode_7_beta/Xcode_7_beta_Release_Notes.pdf

    有几个更新是我最喜欢的了:
    1. 真机调试不再需要 Program了 见 Xcode 7
    2. AppTinning 技术中提到: 提交的应用包含的是bitcode 一种 LLVM中间码,而不是二进制了

    Bitcode. Archive for upload to the App Store in an intermediate LLVM binary representation that the store
    can then optimize into the 64 or 32-bit executable to be delivered to customers.

    这样使得下面这样的代码显得很自然:

    if #available(iOS 8.0, OSX 10.10, *) {
     // Use Handoff APIs when available.
     let activity =
     NSUserActivity(activityType:"com.example.ShoppingList.view")
     activity.becomeCurrent()
    } else {
     // Fall back when Handoff APIs not available.
    }
    

    也就是说实际在用户的设备中,在编译期就减少了很多运行分支,也减少了应用的体积.

    1. InterfaceBuilder 提供了对多Storyboard中关联支持:

      • Interface Builder supports placeholder references for scenes in other storyboards, and segues that cross
      storyboard boundaries.
      之前我使用过 AOLinkedSegue来处理这种问题.

    2. Objective-C 中的集合类型,也支持的类型声明,可以更好的转译成 Swift 接口
      如:

    NSArray<UIImage *> *images;
    NSDictionary<NSString *, NSURL *> *resourcesByName;
    

    PS: Xcode 7 正在下载中,希望 Playground 可以跑得更快了,(之前的体验是经常,出错了,就不动了,经常重新打开)

    15 条回复    2015-06-09 21:47:55 +08:00
    hdbean
        1
    hdbean  
       2015-06-09 10:41:47 +08:00
    Sorry, you cannot view this page.
    janxin
        3
    janxin  
       2015-06-09 10:46:18 +08:00
    这个应该是限制了来源...一不小心居然连接发出去了...
    powtop
        4
    powtop  
       2015-06-09 10:46:59 +08:00
    能否appstore 直接更新
    sobigfish
        5
    sobigfish  
       2015-06-09 11:09:49 +08:00
    @janxin 你有同意保密协议的,看不到就算了,不用贴出来。
    kavi
        6
    kavi  
       2015-06-09 11:15:14 +08:00
    伸手党求一个百度盘的下载
    fly2never
        8
    fly2never  
       2015-06-09 11:28:03 +08:00
    UIStackView不错
    banxi1988
        10
    banxi1988  
    OP
       2015-06-09 11:39:54 +08:00
    @powtop beta 版本向来不能 App Store直接更新.
    其实 App Store直接更新也是全新下载的.
    miromelo
        11
    miromelo  
       2015-06-09 14:01:01 +08:00
    @fly2never
    终于有这货了,当年WP的StackPanel好用到哭
    marginleft
        12
    marginleft  
       2015-06-09 14:03:40 +08:00   ❤️ 1
    @kavi 有些地方从官方下载比较慢,可以到百度网盘下载:
    http://pan.baidu.com/s/1hqiukra
    kavi
        13
    kavi  
       2015-06-09 16:19:30 +08:00
    @marginleft 感谢!
    thedevil5032
        14
    thedevil5032  
       2015-06-09 21:46:29 +08:00 via iPhone
    thedevil5032
        15
    thedevil5032  
       2015-06-09 21:47:55 +08:00 via iPhone
    Swift 2.0 @testable import 可以直接测试 internal entities
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3280 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 13:05 · PVG 21:05 · LAX 06:05 · JFK 09:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.