This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIApplication+Extensions.swift | |
// | |
// Created by Jiang,Zhenhua on 2018/12/17. | |
// Copyright © 2018 Daubert. All rights reserved. | |
// | |
import UIKit | |
import UserNotifications |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EHStreamSession.swift | |
// EShopHelper | |
// | |
// Created by Jiang,Zhenhua on 2018/12/3. | |
// Copyright © 2018 Daubert. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InfiniteTableView.swift | |
// EShopHelper | |
// | |
// Created by Jiang,Zhenhua on 2018/12/1. | |
// Copyright © 2018 Daubert. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Optional.swift | |
// | |
// Created by Jiang,Zhenhua on 2018/11/25. | |
// | |
import Foundation | |
extension Optional { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Accelerate | |
import UIKit | |
extension UIImage { | |
private static let cache = NSCache<NSString, UIImage>() | |
func bluredImage(factor: CGFloat) -> UIImage? { | |
var blur = factor | |
if blur < 0 || blur > 1 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EShopLoadingView.swift | |
// EShopHelper | |
// | |
// Created by Jiang,Zhenhua on 2018/10/16. | |
// Copyright © 2018 Daubert. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AudioProgressiveView.swift | |
// EShopHelper | |
// | |
// Created by Jiang,Zhenhua on 2018/10/16. | |
// Copyright © 2018 Daubert. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
a = add | |
amend = commit --amend | |
c = commit | |
ca = commit --amend | |
ci = commit -a | |
co = checkout | |
d = diff | |
dc = diff --changed | |
ds = diff --staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 是否设置了代理 | |
/// | |
/// - Returns: 代理设置情况 | |
func getProxyStatus() -> Bool { | |
guard let proxySettings = CFNetworkCopySystemProxySettings()?.takeUnretainedValue(), | |
let url = URL(string: "https://www.baidu.com") else { | |
return false | |
} | |
let proxies = CFNetworkCopyProxiesForURL((url as CFURL), proxySettings).takeUnretainedValue() as NSArray | |
guard let settings = proxies.firstObject as? NSDictionary, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PhotoManager.swift | |
// EShopHelper | |
// | |
// Created by Jiang,Zhenhua on 2018/7/25. | |
// Copyright © 2018年 Daubert. All rights reserved. | |
// | |
import Foundation | |
import Photos |