mirror of
https://github.com/HackPlan/IQKeyboardManager.git
synced 2026-06-17 19:06:17 +08:00
- Converted Obj-C demo with Autolayout
- Enhanced demo project and added various examples demonstrating almost all properties of library. - Enhanced library Settings Controller. - Moved some contents of README.md file to other files.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
#import "ExampleTableViewController.h"
|
||||
|
||||
@interface ExampleTableViewController ()<UITableViewDataSource,UITableViewDelegate>
|
||||
@interface ExampleTableViewController ()<UITableViewDataSource,UITableViewDelegate,UIPopoverPresentationControllerDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@@ -68,4 +68,27 @@
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
||||
{
|
||||
if ([segue.identifier isEqualToString:@"SettingsNavigationController"])
|
||||
{
|
||||
segue.destinationViewController.modalPresentationStyle = UIModalPresentationPopover;
|
||||
segue.destinationViewController.popoverPresentationController.barButtonItem = sender;
|
||||
|
||||
CGFloat heightWidth = MAX(CGRectGetWidth([[UIScreen mainScreen] bounds]), CGRectGetHeight([[UIScreen mainScreen] bounds]));
|
||||
segue.destinationViewController.preferredContentSize = CGSizeMake(heightWidth, heightWidth);
|
||||
segue.destinationViewController.popoverPresentationController.delegate = self;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller
|
||||
{
|
||||
return UIModalPresentationNone;
|
||||
}
|
||||
|
||||
-(void)prepareForPopoverPresentation:(UIPopoverPresentationController *)popoverPresentationController
|
||||
{
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user