Complex Programming Problem In Ios