I am trying to make a tool bar appear (which works), once it appears I want to click the done button and dismiss the toolbar (does not work). I dont know how to go about this, I thought by removing pickerview that it will work. I think the biggest problem is my cancel rate method isnt being called.
pickerView = [[UIView alloc]initWithFrame:CGRectMake(0, 300, 180, 260)];
rateToolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, 320, 50)];
rateToolbar.barStyle = UIBarStyleBlackTranslucent;
rateToolbar.items = [NSArray arrayWithObjects:
[[UIBarButtonItem alloc]initWithTitle:@"Done" style:UIBarButtonItemStyleBordered target:self action:@selector(cancelRate)],
[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil],
nil];
[rateToolbar sizeToFit];
[pickerView addSubview:rateToolbar];
[self.view addSubview:pickerView];
-(void)cancelRate{
[pickerView removeFromSuperview];
}