Add blocks for alertview and actionsheet