some common  code in ios develop