President Donald Trump has accused his predecessor Barack Obama of tapping his phones during the election campaign.