Xcode8 适配iOS10时遇见的一些坑

1、证书管理

用Xcode8打开工程后,比较明显的就是下图了,这个是苹果的新特性,可以帮助我们自动管理证书。建议大家勾选这个Automatically manage signing(Ps.但是在beat2版本我用的时候,完全不可以,GM版本竟然神奇的又好了。)



下面我来说说可能会出现的问题:

1.Xcode未设置开发者账号情况下的截图




解决办法是:大家在Xcode的偏好设置中,添加苹果账号,即可。

2.设备机器未添加进开发者的Device情况下的截图




解决办法是:大家在官网将设备添加进开发机后,陪下描述文件重新下个描述文件即可。

3.正常情况:Xcode配置登录开发者账号后的图片,耐心等待即可。




等待完成之后的图



2、Xib文件的注意事项

使用Xcode8打开xib文件后,会出现下图的提示。




大家选择Choose Device即可。
之后大家会发现布局啊,frame乱了,只需要更新一下frame即可。如下图



  • 注意:如果按上面的步骤操作后,在用Xcode7打开Xib会报一下错误,


  • 解决办法:需要删除Xib里面
    <code class="xml"><span class="hljs-tag" style="color: rgb(0, 102, 102);"><<span class="hljs-title" style="color: rgb(0, 0, 136);">capability</span> <span class="hljs-attribute" style="color: rgb(102, 0, 102);">name</span>=<span class="hljs-value" style="color: rgb(0, 136, 0);">"documents saved in the Xcode 8 format"</span> <span class="hljs-attribute" style="color: rgb(102, 0, 102);">minToolsVersion</span>=<span class="hljs-value" style="color: rgb(0, 136, 0);">"8.0"</span>/></span></code>
    这句话,以及把< document >中的toolsVersion和< plugIn >中的version改成你正常的xib文件中的值
    ,不过不建议这么做,在Xcode8出来后,希望大家都快速上手,全员更新。这就跟Xcode5到Xcode6一样,有变动,但是还是要尽早学习,尽快适应哟!

3、代码及Api注意

使用Xcode8之后,有些代码可能就编译不过去了,具体我就说说我碰到的问题。
1.UIWebView的代理方法:
**注意要删除NSError前面的 nullable,否则报错。

<code class="objectivec">- (<span class="hljs-keyword" style="color: rgb(0, 0, 136);">void</span>)webView:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIWebView</span> *)webView didFailLoadWithError:(nullable <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NSError</span> *)error
{
    [<span class="hljs-keyword" style="color: rgb(0, 0, 136);">self</span> hideHud];
}</code>

4、代码注释不能用的解决办法

这个是因为苹果解决xcode ghost,把插件屏蔽了。
解决方法
打开终端,命令运行: sudo /usr/libexec/xpccachectl
然后必须重启电脑后生效

注意:Xcode8内置了开启注释的功能,位置在这里



快捷键的设置在这里



貌似Xcode8取消了三方插件的功能,具体可以查阅下Xcode8 Source Editor

5、权限以及相关设置

注意,添加的时候,末尾不要有空格
我们需要打开info.plist文件添加相应权限的说明,否则程序在iOS10上会出现崩溃。
具体如下图:



麦克风权限:Privacy - Microphone Usage Description 是否允许此App使用你的麦克风?
相机权限: Privacy - Camera Usage Description 是否允许此App使用你的相机?
相册权限: Privacy - Photo Library Usage Description 是否允许此App访问你的媒体资料库?通讯录权限: Privacy - Contacts Usage Description 是否允许此App访问你的通讯录?
蓝牙权限:Privacy - Bluetooth Peripheral Usage Description 是否许允此App使用蓝牙?

语音转文字权限:Privacy - Speech Recognition Usage Description 是否允许此App使用语音识别?
日历权限:Privacy - Calendars Usage Description 是否允许此App使用日历?

定位权限:Privacy - Location When In Use Usage Description 我们需要通过您的地理位置信息获取您周边的相关数据
定位权限: Privacy - Location Always Usage Description 我们需要通过您的地理位置信息获取您周边的相关数据
定位的需要这么写,防止上架被拒。

6、字体变大,原有frame需要适配

经有的朋友提醒,发现程序内原来2个字的宽度是24,现在2个字需要27的宽度来显示了。。
希望有解决办法的朋友,评论告我一下耶,谢谢啦

7、推送

如下图的部分,不要忘记打开。所有的推送平台,不管是极光还是什么的,要想收到推送,这个是必须打开的哟✌️



之后就应该可以收到推送了。另外,极光推送也推出新版本了,大家也可以更新下。

PS.苹果这次对推送做了很大的变化,希望大家多查阅查阅,处理推送的代理方法也变化了。

<code class="objectivec"><span class="hljs-comment" style="color: rgb(136, 0, 0);">// 推送的代理</span>
[<UNUserNotificationCenterDelegate>]</code>

iOS10收到通知不再是在
[application: didReceiveRemoteNotification:]方法去处理, iOS10推出新的代理方法,接收和处理各类通知(本地或者远程)

<code class="css"><span class="hljs-tag">-</span> (<span class="hljs-tag">void</span>)<span class="hljs-rule"><span class="hljs-attribute">userNotificationCenter</span>:<span class="hljs-value">(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { //应用在前台收到通知 <span class="hljs-function" style="color: rgb(0, 102, 102);">NSLog</span>(@<span class="hljs-string" style="color: rgb(0, 136, 0);">"========%@"</span>, notification)</span></span>;}<span class="hljs-tag">-</span> (<span class="hljs-tag">void</span>)<span class="hljs-rule"><span class="hljs-attribute">userNotificationCenter</span>:<span class="hljs-value">(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler { //点击通知进入应用 <span class="hljs-function" style="color: rgb(0, 102, 102);">NSLog</span>(@<span class="hljs-string" style="color: rgb(0, 136, 0);">"response:%@"</span>, response)</span></span>;}</code>

稍后我会更新文章,对推送做一个详细的讲解。

8.屏蔽杂乱无章的bug

更新Xcode8之后,新建立工程,都会打印一堆莫名其妙看不懂的Log.
如这些

<code class="cpp">subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, persist_level: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, default_ttl: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, info_ttl: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, debug_ttl: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, generate_symptoms: <span class="hljs-number" style="color: rgb(0, 102, 102);">0</span>, enable_oversize: <span class="hljs-number" style="color: rgb(0, 102, 102);">1</span>,</code>

屏蔽的方法如下:
Xcode8里边 Edit Scheme-> Run -> Arguments, 在Environment Variables里边添加
OS_ACTIVITY_MODE = Disable



如果写了之后还是打印log,请重新勾选对勾,就可以解决了

9. 插件失效

<code class="sql">Xcode 8 uses library validation. It won't <span class="hljs-operator"><span class="hljs-keyword" style="color: rgb(0, 0, 136);">load</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136);">in</span>-process plugins anymore.</span></code>

这个是由于苹果已经重置插件这块,但有部分优秀的插件已经内置在Xcode了,整体来说,对我影响并不是那么大。

自己还没有尝试过, 因为据说不是持久的解决方案,有需要和兴趣再尝试吧! 另外如果使用 MakeXcodeGr8Again 注意参考下这篇文章:如何让 Xcode8 继续支持 Plugin

  • 内置插件使用
    例如 注释键这个插件,直接通过内置的使用就 OK 了

    VVDocument

    然后将该操作设置成自己熟悉的快捷键,然后这个以往的插件就成为了我们常规的快捷键啦

    设置成自己熟悉的快捷键
PS:
  • 1、Provisioning Profile 文件选取,已经从Buiid Settings移动到了General中,这样更方便我们选取啦

    General 中Provisioning Profile
  • 2、 日志处增加了 过滤搜索条件,这样让我们也可以像安卓同学那样快速选取。另外删除操作后暂时是没有真正的删除日志的,还可以通过点击filter and 空白日志页重新显示出来。

10. ATS的问题

iOS 9中默认非HTTS的网络是被禁止的,当然我们也可以把NSAllowsArbitraryLoads设置为YES禁用ATS。不过iOS 10从2017年1月1日起苹果不允许我们通过这个方法跳过ATS,也就是说强制我们用HTTPS,如果不这样的话提交App可能会被拒绝。但是我们可以通过NSExceptionDomains来针对特定的域名开放HTTP可以容易通过审核。

NSExceptionDomains方式 设置域。可以简单理解成,把不支持https协议的接口设置成http的接口。

具体方法:

1)、在项目的info.plist中添加一个Key:App Transport Security Settings,类型为字典类型。

2)、然后给它添加一个Exception Domains,类型为字典类型;

3)、把需要的支持的域添加給Exception Domains。其中域作为Key,类型为字典类型。

4)、每个域下面需要设置3个属性:NSIncludesSubdomains、NSExceptionRequiresForwardSecrecy、NSExceptionAllowsInsecureHTTPLoads。

如图:

11.  iOS 10 UIStatusBar方法过期:

 

在我们开发中有可能用到UIStatusBar一些属性,在iOS 10 中这些方法已经过期了,如果你的项目中有用的话就得需要适配。

上面的图片也能发现,如果在iOS 10中你需要使用preferredStatusBar比如这样:

<code class="hljs lua" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">//iOS <span class="hljs-number" style="color: rgb(0, 102, 102);">10</span> - (UIStatusBarStyle)preferredStatusBarStyle {    <span class="hljs-keyword" style="color: rgb(0, 0, 136);">return</span> UIStatusBarStyleDefault;
}</code>

 

12. iOS 10 UICollectionView 性能优化

随着开发者对UICollectionView的信赖,项目中用的地方也比较多,但是还是存在一些问题,比如有时会卡顿、加载慢等。所以iOS 10 对UICollectionView进一步的优化。

  • UICollectionView cell pre-fetching预加载机制
  • UICollectionView and UITableView prefetchDataSource 新增的API
  • 针对self-sizing cells 的改进
  • Interactive reordering

  在iOS 10 之前,UICollectionView上面如果有大量cell,当用户活动很快的时候,整个UICollectionView的卡顿会很明显,为什么会造成这样的问题,这里涉及到了iOS 系统的重用机制,当cell准备加载进屏幕的时候,整个cell都已经加载完成,等待在屏幕外面了,也就是整整一行cell都已经加载完毕,这就是造成卡顿的主要原因,专业术语叫做:掉帧.
要想让用户感觉不到卡顿,我们的app必须帧率达到60帧/秒,也就是说每帧16毫秒要刷新一次.

  iOS 10 之前UICollectionViewCell的生命周期是这样的:

  • 1.用户滑动屏幕,屏幕外有一个cell准备加载进来,把cell从reusr队列拿出来,然后调用prepareForReuse方法,在这个方法里面,可以重置cell的状态,加载新的数据;
  • 2.继续滑动,就会调用cellForItemAtIndexPath方法,在这个方法里面给cell赋值模型,然后返回给系统;
  • 3.当cell马上进去屏幕的时候,就会调用willDisplayCell方法,在这个方法里面我们还可以修改cell,为进入屏幕做最后的准备工作;
  • 4.执行完willDisplayCell方法后,cell就进去屏幕了.当cell完全离开屏幕以后,会调用didEndDisplayingCell方法.

  iOS 10 UICollectionViewCell的生命周期是这样的:

  • 1.用户滑动屏幕,屏幕外有一个cell准备加载进来,把cell从reusr队列拿出来,然后调用prepareForReuse方法,在这里当cell还没有进去屏幕的时候,就已经提前调用这个方法了,对比之前的区别是之前是cell的上边缘马上进去屏幕的时候就会调用该方法,而iOS 10 提前到cell还在屏幕外面的时候就调用;
  • 2.在cellForItemAtIndexPath中创建cell,填充数据,刷新状态等操作,相比于之前也提前了;
  • 3.用户继续滑动的话,当cell马上就需要显示的时候我们再调用willDisplayCell方法,原则就是:何时需要显示,何时再去调用willDisplayCell方法;
  • 4.当cell完全离开屏幕以后,会调用didEndDisplayingCell方法,跟之前一样,cell会进入重用队列.
    在iOS 10 之前,cell只能从重用队列里面取出,再走一遍生命周期,并调用cellForItemAtIndexPath创建或者生成一个cell.
    在iOS 10 中,系统会cell保存一段时间,也就是说当用户把cell滑出屏幕以后,如果又滑动回来,cell不用再走一遍生命周期了,只需要调用willDisplayCell方法就可以重新出现在屏幕中了.
    iOS 10 中,系统是一个一个加载cell的,二以前是一行一行加载的,这样就可以提升很多性能;

    iOS 10 新增加的Pre-Fetching预加载

    这个是为了降低UICollectionViewCell在加载的时候所花费的时间,在 iOS 10 中,除了数据源协议和代理协议外,新增加了一个UICollectionViewDataSourcePrefetching协议,这个协议里面定义了两个方法:
<code class="hljs objectivec" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">  - (<span class="hljs-keyword" style="color: rgb(0, 0, 136);">void</span>)collectionView:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UICollectionView</span> *)collectionView prefetchItemsAtIndexPaths:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">NSArray</span><<span class="hljs-built_in" style="color: rgb(102, 0, 102);">NSIndexPath</span> *> *)indexPaths <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NS_AVAILABLE_IOS</span>(<span class="hljs-number" style="color: rgb(0, 102, 102);">10</span>_0);

  - (<span class="hljs-keyword" style="color: rgb(0, 0, 136);">void</span>)collectionView:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UICollectionView</span> *)collectionView cancelPrefetchingForItemsAtIndexPaths:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">NSArray</span><<span class="hljs-built_in" style="color: rgb(102, 0, 102);">NSIndexPath</span> *> *)indexPaths  <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NS_AVAILABLE_IOS</span>(<span class="hljs-number" style="color: rgb(0, 102, 102);">10</span>_0);</code>

   在ColletionView prefetchItemsAt indexPaths这个方法是异步预加载数据的,当中的indexPaths数组是有序的,就是item接收数据的顺序;
   CollectionView cancelPrefetcingForItemsAt indexPaths这个方法是可选的,可以用来处理在滑动中取消或者降低提前加载数据的优先级.
   注意:这个协议并不能代替之前读取数据的方法,仅仅是辅助加载数据.
   Pre-Fetching预加载对UITableViewCell同样适用.


 

13. iOS 10 UIColor 新增方法

以下是官方文档的说明:

Most graphics frameworks throughout the system, including Core Graphics, Core Image, Metal, and AVFoundation, have substantially improved support for extended-range pixel formats and wide-gamut color spaces. By extending this behavior throughout the entire graphics stack, it is easier than ever to support devices with a wide color display. In addition, UIKit standardizes on working in a new extended sRGB color space, making it easy to mix sRGB colors with colors in other, wider color gamuts without a significant performance penalty.

Here are some best practices to adopt as you start working with Wide Color.

  • In iOS 10, the UIColor class uses the extended sRGB color space and its initializers no longer clamp raw component values to between 0.0 and 1.0. If your app relies on UIKit to clamp component values (whether you’re creating a color or asking a color for its component values), you need to change your app’s behavior when you link against iOS 10.

  • When performing custom drawing in a UIView on an iPad Pro (9.7 inch), the underlying drawing environment is configured with an extended sRGB color space.

  • If your app renders custom image objects, use the new UIGraphicsImageRenderer class to control whether the destination bitmap is created using an extended-range or standard-range format.

  • If you are performing your own image processing on wide-gamut devices using a lower level API, such as Core Graphics or Metal, you should use an extended range color space and a pixel format that supports 16-bit floating-point component values. When clamping of color values is necessary, you should do so explicitly.

  • Core Graphics, Core Image, and Metal Performance Shaders provide new options for easily converting colors and images between color spaces.

因为之前我们都是用RGB来设置颜色,反正用起来也不是特别多样化,这次新增的方法应该就是一个弥补吧。所以在iOS 10 苹果官方建议我们使用sRGB,因为它性能更好,色彩更丰富。如果你自己为UIColor写了一套分类的话也可尝试替换为sRGBUIColor类中新增了两个Api如下:

<code class="hljs objectivec" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">+ (<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIColor</span> *)colorWithDisplayP3Red:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)displayP3Red green:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)green blue:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)blue alpha:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)alpha <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NS_AVAILABLE_IOS</span>(<span class="hljs-number" style="color: rgb(0, 102, 102);">10</span>_0);

- (<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIColor</span> *)initWithDisplayP3Red:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)displayP3Red green:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)green blue:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)blue alpha:(<span class="hljs-built_in" style="color: rgb(102, 0, 102);">CGFloat</span>)alpha <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NS_AVAILABLE_IOS</span>(<span class="hljs-number" style="color: rgb(0, 102, 102);">10</span>_0);</code>

8.iOS 10 UITextContentType

<code class="hljs actionscript" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="hljs-comment" style="color: rgb(136, 0, 0);">// The textContentType property is to provide the keyboard with extra information about the semantic intent of the text document.@property(nonatomic,copy) UITextContentType textContentType NS_AVAILABLE_IOS(10_0); // default is nil</span></code>

在iOS 10 UITextField添加了textContentType枚举,指示文本输入区域所期望的语义意义。

使用此属性可以给键盘和系统信息,关于用户输入的内容的预期的语义意义。例如,您可以指定一个文本字段,用户填写收到一封电子邮件确认uitextcontenttypeemailaddress。当您提供有关您期望用户在文本输入区域中输入的内容的信息时,系统可以在某些情况下自动选择适当的键盘,并提高键盘修正和主动与其他文本输入机会的整合。

 

14.  iOS 10 字体随着手机系统字体而改变

当我们手机系统字体改变了之后,那我们Applabel也会跟着一起变化,这需要我们写很多代码来进一步处理才能实现,但是iOS 10 提供了这样的属性adjustsFontForContentSizeCategory来设置。因为没有真机,具体实际操作还没去实现,如果理解错误帮忙指正。

<code class="hljs objectivec" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">  <span class="hljs-built_in" style="color: rgb(102, 0, 102);">UILabel</span> *myLabel = [<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UILabel</span> new];   <span class="hljs-comment" style="color: rgb(136, 0, 0);">/*
    UIFont 的preferredFontForTextStyle: 意思是指定一个样式,并让字体大小符合用户设定的字体大小。
   */</span>
    myLabel.font =[<span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIFont</span> preferredFontForTextStyle: <span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIFontTextStyleHeadline</span>]; <span class="hljs-comment" style="color: rgb(136, 0, 0);">/*
 Indicates whether the corresponding element should automatically update its font when the device’s UIContentSizeCategory is changed.
 For this property to take effect, the element’s font must be a font vended using +preferredFontForTextStyle: or +preferredFontForTextStyle:compatibleWithTraitCollection: with a valid UIFontTextStyle.
 */</span>
     <span class="hljs-comment" style="color: rgb(136, 0, 0);">//是否更新字体的变化</span>
    myLabel.adjustsFontForContentSizeCategory = <span class="hljs-literal" style="color: rgb(0, 102, 102);">YES</span>;</code>

 

1.iOS 10 UIScrollView新增refreshControl

 

iOS 10 以后只要是继承UIScrollView那么就支持刷新功能:

<code class="hljs objectivec" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="hljs-keyword" style="color: rgb(0, 0, 136);">@property</span> (<span class="hljs-keyword" style="color: rgb(0, 0, 136);">nonatomic</span>, <span class="hljs-keyword" style="color: rgb(0, 0, 136);">strong</span>, <span class="hljs-keyword" style="color: rgb(0, 0, 136);">nullable</span>) <span class="hljs-built_in" style="color: rgb(102, 0, 102);">UIRefreshControl</span> *refreshControl <span class="hljs-built_in" style="color: rgb(102, 0, 102);">NS_AVAILABLE_IOS</span>(<span class="hljs-number" style="color: rgb(0, 102, 102);">10</span>_0) __TVOS_PROHIBITED;</code>

11.iOS 10 判断系统版本正确姿势

判断系统版本是我们经常用到的,尤其是现在大家都有可能需要适配iOS 10,那么问题就出现了,如下图:

我们得到了答案是:

<code class="hljs actionscript" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="hljs-comment" style="color: rgb(136, 0, 0);">//值为 1 [[[[UIDevice currentDevice] systemVersion] substringToIndex:1] integerValue]</span>

<span class="hljs-comment" style="color: rgb(136, 0, 0);">//值为10.000000 [[UIDevice currentDevice] systemVersion].floatValue,</span>

<span class="hljs-comment" style="color: rgb(136, 0, 0);">//值为10.0 [[UIDevice currentDevice] systemVersion]</span></code>

所以说判断系统方法最好还是用后面的两种方法,哦~我忘记说了[[UIDevice currentDevice] systemVersion].floatValue这个方法也是不靠谱的,好像在8.3版本输出的值是8.2,记不清楚了反正是不靠谱的,所以建议大家用[[UIDevice currentDevice] systemVersion]这个方法!

Swift判断如下:

<code class="hljs php" style="display: block; padding: 0.5em; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">  <span class="hljs-keyword" style="color: rgb(0, 0, 136);">if</span> <span class="hljs-comment" style="color: rgb(136, 0, 0);">#available(iOS 10.0, *) {</span>
            <span class="hljs-comment" style="color: rgb(136, 0, 0);">// iOS 10.0</span>
            <span class="hljs-keyword" style="color: rgb(0, 0, 136);">print</span>(<span class="hljs-string" style="color: rgb(0, 136, 0);">"iOS 10.0"</span>);
        } <span class="hljs-keyword" style="color: rgb(0, 0, 136);">else</span> { }

</code>

原文链接:http://www.jianshu.com/p/9b3e5111924f
原文链接:http://www.jianshu.com/p/9756992a35ca
原文链接:https://my.oschina.net/gongzhiming/blog/748167
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值