Swift creates bridging files, Swift uses Mjrefresh refresh plugin

Source: Internet
Author: User

Just started to play Swift, want to do a drop-down refresh function, found in OC used more than the third-party plug-in is Mjrefresh. Checked, in the SWIFT use OC plug-in to bridge the file, and then Baidu How to create a bridge file, found that many are old drivers write, not very detailed, so deliberately summed up.

First, create a Head.h file

Second, set the path of the header file in build setting.

Right-click Project > Build Setting > Objective-c bridging Header to add an option.

Path: $ (srcroot)/header.h, if Header.h placed in the Project XX folder, then is: $ (srcroot)/xx/header.h

Iii. introduction of third-party plug-in OC file header

Swift creates bridging files, Swift uses Mjrefresh refresh plugin

Related Article

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.