Nuclear magnetic resonance in a ferromagnet-semiconductor heterostructure