title: Assertion failure in -[UICGColor encodeWithCoder:], /SourceCache/UIKit/UIKit-3318/UIColor.m
body: <pre><code>- (BOOL)application:(UIApplication *)application
      didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
  
    UIColor *navBarColor =
    [UIColor colorWithPatternImage:[UIImage imageNamed:@"SandPattern.jpg"]];
  
      if (floor(NSFoundationVersionNumber) &lt;= NSFoundationVersionNumber_iOS_6_1 {
      [[UINavigationBar appearance] setTintColor:navBarColor];
      }
          else {
      [[UINavigationBar appearance] setBarTintColor:navBarColor];
          }
          // various functions....
          return YES;
  }
  </code></pre>
  
  <p>The app crash and throw the following error.</p>
  
  <p>*** Assertion failure in <code>-[UICGColor encodeWithCoder:], /SourceCache/UIKit/UIKit-3318/UIColor.m:1448</code></p>
  
  <p>*** Assertion failure in <code>-[UICGColor encodeWithCoder:], /SourceCache/UIKit/UIKit-3318/UIColor.m:1448</code></p>
  
  <p><code>libc++abi.dylib</code>: terminate_handler unexpectedly threw an exception</p>