my app is running with no problem in ios 7 but when i run it in ios 6 it goes down. The report is:
2013-10-17 22:58:45.509 Santarem Guide[606:c07] -[_UIAppearance setTintColor:]: unrecognized selector sent to instance 0xa149390
2013-10-17 22:58:45.510 Santarem Guide[606:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIAppearance setTintColor:]: unrecognized selector sent to instance 0xa149390'
*** First throw call stack:
(0x29d8012 0x1951e7e 0x2a634bd 0x29c7bbc 0x29c794e 0x7ade 0x8967b7 0x896da7 0x897fab 0x8a9315 0x8aa24b 0x89bcf8 0x2e69df9 0x2e69ad0 0x294dbf5 0x294d962 0x297ebb6 0x297df44 0x297de1b 0x8977da 0x89965c 0x2dfd 0x20fa725)
libc++abi.dylib: terminate called throwing an exception
(lldb)
Does anyone had this problem?
In my App Delegate i have [[UIView appearance] setTintColor:[UIColor whiteColor]]; and if i turn it this to [[UIView appearance] setBackgroundColor:[UIColor whiteColor]]; i get a new error that is
2013-10-17 23:08:58.310 Santarem Guide[659:c07] -[UITableView setTintColor:]: unrecognized selector sent to instance 0x1138aa00
and all gets white.
You should check if the method is available before use it.
if ([[UIView appearance] respondsToSelector:@selector(setTintColor:)]) {
[[UIView appearance] setTintColor:[UIColor whiteColor]];
}
Check whether target device is iOS7-compatible:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[[UIView appearance] setTintColor:[UIColor whiteColor]];
}
So i figured out, i had several errors because i was using some code that ios6 does not support. I had to put
if (SYSTEM_VERSION_LESS_THAN(@"7.0")) {
// code here
} else {
code here
}
In many parts of the project so he could run in ios6. Another problem was i was also using my map with 3D.
Thanks for the replies
In this case you have to include following macro in the class or global in .pch
-file
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With