John Swinney faced questions on single-sex spaces and trans rights.