add post that type casting in swift