I have some warning which worked well in ios 7 & 8. While we work with iOS 9 its gives me a warning.
This is the warning :
'appearanceWhenContainedIn:' is deprecated: first deprecated in iOS 9.0 - Use +appearanceWhenContainedInInstancesOfClasses: instead
So I used this code :
[[UITextField appearanceWhenContainedInInstancesOfClasses:[UISearchBar class], nil] setTextColor:[UIColor whiteColor]];
Instead of this code:
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor whiteColor]];
But when I used I got the error:
Too many arguments to method call, expected 1, have 2
warning:
'base64Encoding' is deprecated: first deprecated in iOS 7.0
In below code:
NSString *authValue = [NSString stringWithFormat:@"Basic %@", [authData base64Encoding]];
warning:
'searchDisplayController' is deprecated: first deprecated in iOS 8.0
In below code:
[self filterContentForSearchText:searchText scope:[[self.searchDisplayController.searchBar scopeButtonTitles]
objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
warning:
'sendSynchronousRequest:returningResponse:error:' is deprecated: first deprecated in iOS 9.0 - Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h
In below code:
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
I am working with iOS9. I need to remove all these warnings. Thanks in advance!