Apple pulled technology companies lower after Carl Icahn said he had sold his shares, and consumer companies also lost ground.