in the collision detection callback check the following.
if(y-origin of the first animal + its height < the y-origin of the second animal){
//then do the logic for walking on top of another animal (probably nothing would happen here depending on what you are trying to build)
}
else {
//forward to collision logic (e.g life loss, lose points, restart level ,etc..)
}
if it is possible for the first animal to go underneath the second animal then you need to update your condition to the following
if(firstAnimal.origin.y + firstAnimal.frame.size.height < secondAnimal.frame.origin.y
|| firstAnimal.origin.y > secondAnimal.frame.origin.y + secondAnimal.frame.size.height)
be wary of different coordinate systems it could be confusing sometimes. hope this helps, feel free to ask if anything is unclear.