Fixed some ios8 depricated functions and autolayout