Nothing's immume to trojans, viruses, or other malware.
It just depends on whether the hackers think it's worthwhile developing specific malware for a particular platform.
Windows is more popular so it's targetted most.
Apple is always very reluctant to admit security problems and has been criticised widely for underplaying malware infections in the past.
This time round they didn't have any choice though as it was a critical flaw that had to be dealt with immediately.