The UK will last longer than the EU. The EU has a fundamental schism of a shared monetary policy, without a shared fiscal policy (see euro sovereign debt crisis). It also has a problem regarding the population becoming increasingly sceptical of freedom of movement, voting for more socially conservative parties.
Hopefully the EU can be reformed to go back to a trading bloc, with a liberal visa regime for member states, rather than an idealistic United States of Europe model, punctuated periodically by brutal austerity.