UISlider を UINavigationBar に追加しようとしています。スライダーが表示されているところまで持っているのですが、値を変えようとすると動きません。これがviewWillAppearのコードです。これはメインの親ビューではなく、子ビューにあることに注意してください。
UIView *viewofslider = [[UIView alloc] initWithFrame:CGRectMake(160, 10, 40, 30)];
UISlider *theslider = [[UISlider alloc] init];
[theslider addTarget:self action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged];
[theslider setBackgroundColor:[UIColor clearColor]];
theslider.minimumValue = 50.0;
theslider.maximumValue = 150.0;
theslider.continuous = YES;
theslider.value = 100.0;
[viewofslider addSubview:theslider];
[self.navigationController.navigationBar addSubview:viewofslider];