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
struct user_Model:Codable { | |
var fullName:AnyCodableValue? | |
var age:AnyCodableValue? | |
var point:AnyCodableValue? | |
var isVerified:AnyCodableValue? | |
init(from decoder: Decoder) throws { | |
let container = try decoder.container(keyedBy: CodingKeys.self) | |
self.fullName = try container.decodeIfPresent(AnyCodableValue.self, forKey: .fullName) |
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
// | |
// anyCodabelValue.swift | |
// Sajjad Sarkoobi | |
// | |
// Created by Sajjad Sarkoobi on 6/8/20. | |
// Copyright © 2020 Sajjad Sarkoobi. All rights reserved. | |
// Email: [email protected] | |
import Foundation |
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
// | |
// userHolder.swift | |
// Medium_userDefaults | |
// | |
// Created by Sajjad Sarkoobi on 9/3/18. | |
// Copyright © 2018 sarkoobi. All rights reserved. | |
// | |
import Foundation | |
var UserHolder = userData() |
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
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |