Skip to content

Instantly share code, notes, and snippets.

View aakhedr's full-sized avatar

Ahmed Khedr aakhedr

View GitHub Profile
@aakhedr
aakhedr / AppearanceProxies-Swift4-iOS11
Last active April 25, 2018 08:17
Appearance Proxies
func appearances() {
let windows = UIApplication.shared.windows
for window in windows {
for view in window.subviews {
view.removeFromSuperview()
window.addSubview(view)
}
}
setupProxies()
func sendDataToRemoteServer(_ data: [[ : ]], hotelName: String) { success, error in
if error != nil {
DispatchQueue.main.async {
// DO NOT REMOVE THE COMPLETED CHECKLIST STEPS FROM THE DEVICE
// Show something to the user to let them know checklist is not sent to remote server
} else {
DispatchQueue.main.async {
// It's now safe to remove the checklist completed steps from the device
// Possibly show user an animation 'Checklist sent'
}