you have to keep track of your days in the UK (max 90 excluding travel days)and your flying time/duty time ,(UK/no UK).
If you have a house in the UK it becomes a bit more difficult!
Use a good tax accountant who knows the aviation industry! (fry accountants are good but also expensive)
it depends on the country you want to live in if you have to pay tax there ,use good tax advisors to prevent problems in the long run!
Neil