I want to have a setting in an iphone app that uses a toggle switch to allow something to be turned on or off. I have seen tutorials, but they only show how to do this in the iPhone’s settings place. I want this done inside the application. Any guides, help advice. I’m going for something similar to the picture below.

You can use the UISwitch as accessoryView. This will look (almost?) exactly like in your picture.
Something like this: