Steven R. Swartz, president and chief executive of Hearst, will replace Katherine G. Farley, the longtime chair, in June.