strings <file_name> | grep "your_text"
- same above
- Find hidden text by https://stylesuxx.github.io/steganography/
strings <file_name> | grep "your_text"
import UIKit | |
class MarginLabel: UILabel { | |
var insets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) | |
override func drawText(in rect: CGRect) { | |
super.drawText(in: rect.inset(by: insets)) | |
} |
public struct URLCredentialHelper { | |
enum URLCredentialError { | |
static let invalidUrl = NSError(domain: NSURLErrorDomain, code: NSURLErrorBadURL, userInfo: nil) | |
} | |
static func store(user: String, password: String, url: String) throws { | |
let protectionSpace = try createProtectionSpace(for: url) | |
let credentital = URLCredential(user: user, password: password, persistence: .permanent) | |
URLCredentialStorage.shared.set(credentital, for: protectionSpace) | |
} |
extension Sequence { | |
func forEach(_ closure: (Element) -> () -> Void) { | |
for element in self { | |
closure(element)() | |
} | |
} | |
} | |
let arr = [view1, view2] | |
arr.forEach(UIView.removeFromSuperview) |
private let swizzling: (AnyClass, Selector, Selector) -> () = { forClass, originalSelector, swizzledSelector in | |
let originalMethod = class_getInstanceMethod(forClass, originalSelector) | |
let swizzledMethod = class_getInstanceMethod(forClass, swizzledSelector) | |
method_exchangeImplementations(originalMethod!, swizzledMethod!) | |
} | |
extension UIViewController { | |
static let swizzled: Void = { | |
let originalSelector = #selector(viewDidLoad) | |
let swizzledSelector = #selector(swizzled_viewDidload) |