add showViewAtIndex completion function