create myself iOS common function