Objective-C
Declare a slider property in the ViewController.h or in the interface of ViewController.m
@property (strong, nonatomic)UISlider *slider;
//Define frame of slider and add to view
CGRect frame = CGRectMake(0.0, 100.0, 320.0, 10.0);
UISlider *slider = [[UISlider alloc] initWithFrame:...