I\'ve seen some demos where UIPopoverController is used and would like to use it in my apps.
So does anyone have any good tutorials that you could link me?
I
Here are some tutorials:
Segmented Popover:
For popover in iPad we can use ActionSheetStringPicker, and for implementing it in your project you need to import ActionSheetStringPicker into your controller. like - #imaport "ActionSheetStringPicker.h"
After importing this you have to create an array which has only string type value.
e.g.
NSArray *sourceArray=[[NSArray alloc]initWithObjects:@"Take Photo",@"Choose Photo", nil];
And last you have to implement below method.
[ActionSheetStringPicker showPickerWithTitle:@"Any title"
rows:sourceArray
initialSelection:yourInitialSelectionIntValue
doneBlock:^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
NSLog(@" Index : %ld, value : %@",
(long)selectedIndex, selectedValue);
if ([selectedValue isEqualToString:@"Choose Photo"]) {
// open photo lib
[self youerMethdeOpenPhotoLib];
}
else
{
// open Camera
[self yourMethodOpenCamera];
}
}
cancelBlock:^(ActionSheetStringPicker *picker) {
NSLog(@"Select photo Cancel");
}origin:YourTapButtonObject];