IOS-get rid of outdated methods (continuous updates ...) )

Source: Internet
Author: User

1. "Pop-up prompt dialog box"

Before iOS9 we use Alertview to pop up the dialog, now we recommend using Alertcontroller, for this change, refer to another blog, "iOS9 use the correct implementation of the prompt box."

2. "stringbyaddingpercentencodingwithallowedcharacters replacement stringbyaddingpercentescapesusingencoding"

This method is really very long ... We use this method to change the way strings are encoded. The most common place is to make an HTTP network request, the parameters of the sent link if with Chinese, then the first need to call this method to change the encoding mode to UTF8, because the server side is generally used UTF8 encoding. The function is the same for both implementations.

3. "Nsurlsession Replacement Nsurlconnection"

Nsurlsession has gradually embarked on the stage of history. The recent use of [Nsurlconnection Sendasynchronousrequest] has been warned that is not recommended to use, then we will replace the Datataskwithrequest method in Nsurlsession.

4. "Presentviewcontroller Replacement Presentmodalviewcontroller"

This is a method of ejecting a modal view, and the Presentmodalviewcontroller method is first deprecated in iOS6. If you use the navigation bar, you cannot use this type of jump.

5. "Uialertcontrollerstyleactionsheet in Alertcontroller replace Actionsheet"

Actionsheet was discarded after iOS8.3. The following warning will appear:

Reference Link: http://blog.csdn.net/chenyufeng1991/article/details/50060061

IOS-get rid of outdated methods (continuous updates ...) )

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.