The sun finally shone on the Duke and Duchess of Cambridge for the last public appearance of their 10-day visit to New Zealand.