This file contains 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 UIKit | |
extension UIWindow { | |
func changeRootViewController(new viewController: UIViewController) { | |
UIView.transition( | |
with: UIApplication.shared.keyWindow!, | |
duration: 0.5, | |
options: .transitionCrossDissolve, | |
animations: { | |
UIApplication.shared.keyWindow?.rootViewController = viewController |
This file contains 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 UIKit | |
extension UIWebView { | |
func setCustomUserAgent() { | |
let classiSuffix = Constants.userAgent | |
let originalUserAgent = stringByEvaluatingJavaScript(from: "navigator.userAgent")! | |
let customUserAgent = originalUserAgent + "+CustomUA" | |
UserDefaults.standard.register(defaults: ["UserAgent": customUserAgent]) | |
print("new userAgent: \(pbUserAgent)") | |
} |
This file contains 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 UIKit | |
import SnapKit | |
import RxSwift | |
import RxCocoa | |
final class ManageView: UIView { | |
let descriptionLabel = UILabel() | |
let greetingTitleLabel = UILabel() | |
let greetingLabel = UILabel() | |
let segmented = UISegmentedControl(items: ["挨拶の始まり選択", "自由入力"]) |
This file contains 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 Foundation | |
protocol Observer { | |
var id: String { get } | |
func update(_ string: String) | |
} | |
extension Observer { | |
func update(_ string: String) { | |
print("\(type(of: self)) に届いた新しい値は \(string) です。") |
This file contains 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
#!/bin/bash | |
PLIST=platforms/ios/*/*-Info.plist | |
cat << EOF | | |
Add :NSAppTransportSecurity dict | |
Add :NSAppTransportSecurity:NSExceptionDomains dict | |
Add :NSAppTransportSecurity:NSExceptionDomains:dev.example.com dict | |
Add :NSAppTransportSecurity:NSExceptionDomains:dev.example.com:NSExceptionAllowsInsecureHTTPLoads bool YES | |
Add :NSAppTransportSecurity:NSExceptionDomains:dev.example.com:NSExceptionRequiresForwardSecrecy bool NO |
This file contains 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
set nosmoothscroll | |
set noautofocus | |
let searchlimit = 30 | |
let scrollduration = 10 | |
let scrollstep = 70 | |
let locale = "jp" | |
let searchalias g = "google" | |
let blacklists = ["chrome://*","https://mail.google.com/*","http://feedly.com/*","https://www.google.com/calendar/*","https://my.omniture.com/*"] | |
let barposition = "bottom" |
NewerOlder