Very strange.. but I found a way to temporary fix these screen and button artifacts in iBook and XCode until the next bootup:
0. Restart you hackintosh
1. Open iBook
2. Open a book from your Library and scroll it randomly
3. Click on every distorted icon you see in iBook several time
4. Click on the Apple icon in the top left corner several time
5. After clicking on problematic icons and screen artifacts just Quit iBook (quit, not just close)
6. Open iBook again and repeat steps 1-5..
For the second or third time you open iBook, do random clicking on problematic areas and quitting you'll notice the graphics distortions and screen artifacts go away completely. Now if you launch XCode you should see no graphic issues. I don't know why this is working for me.. Can someone report back if it's worked?
UPDATE:
I don't know what I changed but seems like fixed to me, but some icons are glitchy:
iBook and Instruments working now.
For 10.12.4 Sierra it's working for me, too.
Somehow managed to fix these iBook and XCode issues for my Haswell build, see
this post.
UPDATE2:
Also, if you disable Intel processor graphics in BIOS, these issues will go away...