Created
November 30, 2015 10:16
-
-
Save hemant3370/b0abb60578de78d26bb3 to your computer and use it in GitHub Desktop.
popover initiation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)countryPop{ | |
UIViewController *countryContent = [[UIViewController alloc]init]; | |
UIView *popDataPickerView = [[UIView alloc]init]; | |
popDataPickerView.backgroundColor = [UIColor whiteColor]; | |
UIPickerView *countryPicker = [[UIPickerView alloc]init]; | |
self.countryList = [[UIPopoverController alloc]initWithContentViewController:countryContent]; | |
self.countryList.delegate = self; | |
countryPicker.delegate=self; | |
countryPicker.dataSource = self; | |
[popDataPickerView addSubview:countryPicker]; | |
countryContent.view = popDataPickerView; | |
[self.countryList setPopoverContentSize:CGSizeMake(320, 240) animated:YES]; | |
[self.countryList presentPopoverFromRect:txtCountry.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment