The president criticised the media’s coverage of his decision to ban those coming to the US from China.