iOS Development--a summary of the new features of the grammar OC Chapter &OBJECTIVE-C

Source: Internet
Author: User

Summary of new features of Objective-c

1.nonnull

Nonnull: Mark the current property is not empty, let the outside world rest assured that use, only for marking, even if empty, also wood has the way
Equivalent to Swift inside! No.

@property (nonnull, nonatomic, strong) NSString *name;

2.nullable
Nullable: Indicates that the current attribute may be empty, let the outside world use the note
Equivalent to the inside of Swift? No.

@property (Nullable, nonatomic, strong) NSString *petname;

3.<person *>
A bit like the combination of generics and IDs to tell developers what ghosts are inside the array
Represents the object within the array is the type of the kind, which is not required to be strongly transferred from the parent class to the subclass when used by the developer

@property (Nullable, nonatomic, strong) Nsarray<person *> *friends;

iOS Development--a summary of the new features of the grammar OC Chapter &OBJECTIVE-C

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.