I am using NSUserDefaults and I have code mondayalarm = [prefs stringForKey:@"mondayalarm"];, and mondayalarm (first link, not key) is NSDate. This gives me a warning:
mondayalarm = [prefs stringForKey:@"mondayalarm"];
incompatible Objective-C types assigning 'struct NSString *', expected by 'struct NSDate *'
How can I get him to accept this without warning?
To prevent a warning:
mondayalarm = (NSDate*)[prefs stringForKey:@"mondayalarm"];
To fix the problem:
mondayalarm = [prefs objectForKey:@"mondayalarm"];
Source: https://habr.com/ru/post/1784632/More articles:Visual Studio 2010, how to quickly capture an object as serialized XML? (when debugging) - visual-studio-2010WCF RIA Services - принимать меры при загрузке всех данных - c#android html download and parse error - androidsend AppStore and notify users - iphoneLayout form with long labels - androidHow to simulate a calendar application? - calendarIn jQuery how to create an alert every 5 seconds? - javascriptBundle ID of various forms of application? - objective-cNew for Rails / paper clips - paper clips won't save - ruby-on-railshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1784637/is-it-fair-for-us-to-conclude-xor-string-encryption-is-less-secure-than-well-known-encryption-say-blowfish&usg=ALkJrhhGBpLkzrxDguh-Hsy0Hqg4MjIgJgAll Articles