My wife have a lebanese passport and temporary swedish residency till 2020. My question is do she need to apply for a visa to visit UK.
Thank you for your question!
A third-country citizen with a residence permit in an EU country has the right to travel and visit other EU countries but does not have the same right as EU citizens to reside in other countries. Your wife has the right to travel to UK according to the unions law about free movement. Since the UK is still a part of EU the laws apply to them as well. We will have to wait and see whats laws are current after BREXIT.
If you are uncertain about the regulations regarding traveling with a temporary residency then you can contact Migrationsverket or press HERE to find out more.
I hope that I answered your question!