Changed dismissModalViewController to dismissViewController because deprecation.