instead of init, send the message initWithFrame: (CGRect). It seems that there is a view, it just has a frame (0,0,0,0)
Here is the code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; ViewController *vc = [[ViewController alloc] init]; [vc.view setBackgroundColor:[UIColor redColor]]; MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectMake(20, 20, 200, 50)]; [volumeView setShowsVolumeSlider:YES]; [volumeView setShowsRouteButton:YES]; [volumeView sizeToFit]; [vc.view addSubview:volumeView]; UILabel *testLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 50, 200, 50)]; testLabel.text = @"TESTING"; [vc.view addSubview:testLabel]; [self.window setRootViewController:vc]; [self.window makeKeyAndVisible]; [vc viewDidLoad]; return YES; }
It works when testing on a device:

source share