Transfers of firearms between private parties who are residents of different states is against Federal Law (Title 18 Chapter 44 Section 922, better known as 18 USC 922), period. There is one excpetion, when a person dies, the heir to the estate, either named in a will, or by intestate (without a will) succession can go to another state to retrive the firearms and bring them back into their own state.
There are no other exceptions for private parties: gift, sales, family, not family, it doesn't matter, no other exceptions.
The only legal way for the transfer of a handgun to occur is for the seller/giver to transport and/or ship the handgun to an FFL in the buyer/receiver's state. The seller/giver may choose to have an FFL in their state do the shipping to an FFL in the recipient state, but it is not required.
The receiver/buyer then goes to the FFL in their own state and accomplishes the transfer, filling out the form 4473, doing the background check, and anything else required just as if the recipient purchased the handgun themselves from the FFL.
Longguns are exactly the same, with one exception. The transfer might be able to occur at an FFL in the giver/sellers state, if the receiver/buyer travels to that FFL to accomplish the transfer, provided that neither states' laws prevent the transaction.