The Nasdaq hit a new high on Tuesday, led by gains in Apple shares.