title: Some Swift 4 Codes Does not Executed in different iPhone version
body: <p>So, I have some codes that have to run in quite range iPhone version, from 5s to 8 and 8+, with minimum iOS version is iOS 10. These codes suppose to show some menu items based on the user loggin status. If there was a user login, it suppose to show the menu like this:</p>
  
  <p><a href="https://drive.google.com/open?id=1UdZXExp70cB35EdMNxu5nJKyeya8bniZ" rel="nofollow noreferrer">if there was a user logged in</a></p>
  
  <p>if not, it suppose to show the menu like this:</p>
  
  <p><a href="https://drive.google.com/open?id=1kq8lrMs8R6wMLy0qYHLuSctSz8lf6z4F" rel="nofollow noreferrer">if there was not a user logged in</a></p>
  
  <p>Here is the code:</p>
  
  <pre><code>    if let LoginStatus = userdefault.value(forKey: "loginStatus") as? Bool {
              if LoginStatus { //if there is a user login, do these things
                  iconMenu = ["icoFeatured", "icoOrder", "icoReward", "icoPayment", "icoReferral", "icoSupport", "icoSettings"]
                  titleMenu = ["Featured", "Order History", "Reward Cards", "Payment Methods", "Referral Code", "Support", "Settings"]
                  titleMenu2 = ["About", "Logout"]
              } else { //if there is NO user login, do these things
                  iconMenu = ["icoFeatured", "icoSupport", "icoSettings", "icoClose"]
                  titleMenu = ["Featured", "Support", "Settings", "Crash Test"]
                  titleMenu2[titleMenu2.count-1] = "Login/Register"
              }
          }
  </code></pre>
  
  <p>Everything is okay when I test it using 6/6+, 6s/6s+, 7/7+ and 8/8+, but when I test it using 5s, it is not executed my optional binding</p>
  
  <pre><code> if let LoginStatus = userdefault.value(forKey: "loginStatus") as? Bool {...}
  </code></pre>
  
  <p>I'm wondering, how can it happen? iPhone 5s should be able to execute Swift 4 codes correctly when iOS10 and later is installed, should not it? If anyone can help me figure out about this, I really appreciate it.</p>