Summary of new features of IOS9!!!

Source: Internet
Author: User

#iOS9 New Introduction

# #一. Uistackview

* New control: Uistackview stack view, similar to AppleWatch group

* Parent class: UIView

Characteristics

1. Can only be hashed vertically or horizontally, and therefore cannot completely replace AutoLayout

2. Ability to quickly get to child controls sequentially

3. Batch modification spacing is faster

4. Batch modification alignment faster

* Application Scenario:

1. Level-label/custom Tabbar

2. Vertical-Settings menu

# #二. safariservices

"Sfsafariviewcontroller *SAFARIVC = [[Sfsafariviewcontroller alloc] Initwithurl:[nsurl urlwithstring:@" https:// Www.baidu.com "];

‘‘

"[Self.navigationcontroller PUSHVIEWCONTROLLER:SAFARIVC Animated:yes];

Q: When do I use the safari Services Framework? When do I use WebView?

A: When our app needs to display Web content, but does not need to customize these content, the use of SF directly, easy

# #三. IOS9 Quick Fit

1. Network adaptation

* Server Adapter HTTP HTTPS

* plist configuration (use of unsecured HTTP protocol network requests)

All HTTP requests are changed to HTTPS in the iOS9. The purpose was to increase security.

"HTTP is equivalent to using plaintext in the process of communicating with the server."

"HTTPS is equivalent to using encrypted data in the process of communicating with the server."

"PlainText communication, or unencrypted communication, can pose some risks." Such as: eavesdropping, impersonation, tampering

1. Add the nsapptransportsecurity type in Info.plist Dictionary

2. Under Nsapptransportsecurity, add the Nsallowsarbitraryloads type Boolean with the value set to YES

2. App Jump-Share

* IOS9 New method for handling inter-app jumps

* Added the plist list of key value pairs, to jump, you must add trust

Add the key lsapplicationqueriesschemes, then modify it to an array, click on the + sign adding item, put in the urlscheme to jump

# #四. IOS9 new Syntax

1. nullability is a null mark

* Launched at Xcode6.3

* Similar to Swift's? and!, Nullable: __nullable/nullable, cannot be empty: __nonnull/nonnull

* Meaning: When you see the nullable, you will be sentenced to empty processing

* Most are nonnull, with macros defined for ease of use: Ns_assume_nonnull_begin and Ns_assume_nonnull_end

* Compiler level-does not change the bottom of the system, similar to the arc-compilation period

2. Lightweight generics lightweight generics

* You can specify the type of objects in the container class

nsarray<nsstring *> *strings = @[@ "Dong", @ "Peng"];

Nsdictionary<nsstring *, nsnumber *> *mapping = @{@ "A": @1, @ "B": @2};

* Meaning: Don't think much about what is stored in the following array, avoiding the confusion of the use of jumping head files and types.

* Pure compiler Syntax Support (LLVM 7.0), like nullability, without any OBJC runtime upgrades, that is, this new syntax is available on Xcode 7 and fully backwards compatible (lower IOS version)

Three. __kindof

1. The return value is clearly indicated and the user does not have to write a strong turn.

-(__kindof UITableViewCell *) Dequeuereusablecellwithidentifier: (NSString *) identifier;

Example: Using the UITableViewCell sub-type pointer to receive the return value, so that the API in order to let developers do not have to write the pain every time the explicit strong turn, the return value is defined as the ID type,

And this API actually means to return an instance of a UITableViewCell or UITableViewCell subclass.

2. To take another example with generics, the Subviews attribute of UIView is changed to:

@property (nonatomic, readonly, copy) nsarray<__kindof UIView *> *subviews;

This way, there is no warning when writing the following code:

UIButton *button = (UIButton *) View.subviews.lastObject;

Summary of new features of IOS9!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.