Former University of Kentucky swimmer Riley Gaines blasted the co-hosts of "The View" on Wednesday, calling them "deranged" and "out of touch" after they spoke out in defense of Delaware Rep.-elect Sarah McBride over a resolution that would ban transgender women from using women’s restrooms at the U.S. Capitol.

Gaines, a 12-time NCAA All-American swimmer who has publicly spoken out against trans inclusion in women’s and girls sports and advocated for protecting women’s spaces, posted a message on X calling out the group for speaking out on an issue that does not directly impact them.

Riley Gaines speaks during a campaign rally for former President Trump at Desert Diamond Arena on Aug. 23, 2024, in Glendale, Arizona.

Riley Gaines speaks during a campaign rally for former President Trump at Desert Diamond Arena on Aug. 23, 2024, in Glendale, Arizona. (Rebecca Noble/Getty Images)

"I wonder if the deranged, out-of-touch women on The View would be comfortable letting Mr. McBride change in a locker room inches away from their own daughters," she wrote in a post on X which accompanied a clip of the show. 

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"It never matters until it affects you personally." 

Gaines competed against former UPenn swimmer Lia Thomas, a transgender athlete, at the NCAA championships in 2022, where she said the NCAA had opted to give Thomas the fifth-place trophy for the "photo op" despite them tying in the women’s 200 freestyle.  

Thomas would go on to win a national title in the women’s 500 freestyle. 

Gaines was responding to a segment of Tuesday’s episode of "The View" where the co-hosts reacted to a resolution by Rep. Nancy Mace, R-S.C., to ban transgender women from using women’s restrooms at the U.S. Capitol in response to McBride, the first openly transgender federal lawmaker set to join Congress in January.

RILEY GAINES REPEATEDLY TEARS INTO AOC FOR TAKING PRONOUNS OUT OF X BIO AFTER ADVOCATING FOR TRANS ATHLETES

"I don’t understand how this is [Mace’s] welcome to someone who is coming to make a difference in the country," Whoopi Goldberg said.  

Rep.-elect Sarah McBride

Rep.-elect Sarah McBride joins other congressional freshmen of the 119th Congress for a group photograph on the steps of the U.S. Capitol on Nov. 15, 2024. (Andrew Harnik/Getty Images)

"It’s not a welcome, it’s flipping her the middle finger. Because she is the one person in the House that this will affect," Sara Haines responded, adding, "And this woman that came and sat at our table is one of the most decent, amazing politicians I’ve ever seen. Her messaging resounded across the boards."

Alyssa Farah Griffin chimed in, calling the attempt to ban McBride "gross."

"It is a new member of Congress, who ran as a centrist democrat, talked about issues – pocketbook issues. She said at our table ‘I am not a spokesperson for my community. I’m running to deliver for Delaware.’ And Nancy Mace is trying to goad her into a fight she did not sign up to be part of. She’s trying to pigeonhole her into ‘You have to be this culture warrior, who makes this your whole identity’ purely because Nancy Mace doesn’t like how she chooses to exist." 

CLICK HERE TO GET THE FOX NEWS APP

Mace speaks to reporters in Capitol hallway

Rep. Nancy Mace arrives for a House Republican caucus meeting at the U.S. Capitol on Nov. 19, 2024. (Kevin Dietsch/Getty Images)

Gaines said in a separate post on X Wednesday that she would be "happy" to join "The View" for a conversation after disagreeing with Goldberg’s numbers regarding trans athletes competing in public schools. 

Fox News’ Liz Elkind contributed to this report. 

Follow Fox News Digital’s sports coverage on X, and subscribe to the Fox News Sports Huddle newsletter.