Im trying to do something very simple. Have a slider for volume that changes in width based on the devices' size or orientation.
- (void)viewDidLoad {
[super viewDidLoad];
[self setUpVolumeView];
}
- (void) setUpVolumeView {
// Volume control
MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.myBoxForVolume.bounds];
[self.myBoxForVolume addSubview:volumeView];
//[volumeView sizeToFit];
}
I set the myBoxForVolume a certain distance from the left bound of the device's view and a certain distance from the right bound of the device's view in my storyboard. I would like the volumeView to have the same exact width as the myBoxForVolume (keeping in mind that myBoxForVolume can change in size), but for some reason I am unable to establish volumeView with the correct bounds.