写XWSwiftLoader库的目的:Swift
环境中+ (void)load;
与+ (void)initialize;
的实现;
XWSwiftLoader is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'XWSwiftLoader'
You can new a .m file anywhere of your project ,and reference in your project.
wtire the code Like this in the xxx.m file
#import <Foundation/Foundation.h>
#import <XWSwiftLoader_Example-Swift.h>
XW_SWIFT_LOADER(ViewController)
import UIKit
import XWSwiftLoader
@objc class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
extension ViewController: XWSwiftLoaderProtocol {
static func xw_Load() {
print("xw_Load")
}
static func xw_Initialize() {
print("xw_Initialize")
}
}
注
MGJRouter_Swift:一个高效/灵活的 iOS Swift 版 URL Router,完全实现了蘑菇街 Object-C 版 MGJRouter 的所有功能。虽然 github 上也有一款参照 MGJRouter 仿写的 Swift 版框架,但是却去掉了 MGJRouter 的很多功能,不实用。
RSA_Swift:这是一个 Swift
版本轻量级的框架,框架功能包括:RSA
加密/解密字符串、RSA
加密/解密 Data
、字符串的 MD5
、文件的 MD5
值的获取。
简书号:Mr_Xie,如果你有什么建议,可以关注我的简书,直接留言,留言必回。
XWSwiftLoader is available under the MIT license. See the LICENSE file for more info.