Is there any way you can get a cat to like you?

My boyfriend's cat is so not impressed with me and it hurts my feelings. She used to be okay with me, would come up and let me pet her, would bring me toys to throw for her (yes she fetches like a dog), but then one day I went over to his place when he wasn't there and she hissed at me and swatted at me.

Now she always growls and hisses at me and swats at me if I walk by her. She will still come up to me occassionally and let me pet her, more so if my bf is there too. Mostly I've been trying to ignore her and not force the issue.

I'm more of a dog person than a cat person (in regards to knowing behavior) so any tips would be greatly appreciated.