Closed SadhuRus closed 9 years ago
If you open example you will see that it is wokring, make sure that movementActionWhenKeyboardAppears you have set to MZFormSheetActionWhenKeyboardAppearsDoNothing
I try it. But not work.
In the example, it is also no longer work if you delete the line: presentedViewController.textFieldBecomeFirstResponder = YES;
I want to use a pop-up window without TextField.
I change you default code and now it work for me:
@autoreleasepool {
MZFormSheetPresentationController *appearance = [self appearance];
[appearance setContentViewSize:CGSizeMake(284.0, 284.0)];
[appearance setPortraitTopInset:66.0];
[appearance setLandscapeTopInset:6.0];
[appearance setContentViewCornerRadius:5.0];
[appearance setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.5]];
[appearance setShouldCenterVertically:YES];
[appearance setBlurEffectStyle:UIBlurEffectStyleLight];
[appearance setMovementActionWhenKeyboardAppears:MZFormSheetActionWhenKeyboardAppearsDoNothing];
}
P.S: I Added this line in +(void)load:
[appearance setShouldCenterVertically:YES];
hi, i'm also facing the issue where the shouldCenterVertically does not work unless the software keyboard is being triggered.
Any solutions without directly modifying the source files?
I just found a solution for this; You need to specify .shouldCenterVertically before setting the contentViewSize.
i.e instead of:
let formSheet = MZFormSheetPresentationController(contentViewController: viewController)
formSheet.contentViewSize = CGSizeMake(280.0, 280.0)
formSheet.contentViewControllerTransitionStyle = .StyleFade
formSheet.shouldDismissOnBackgroundViewTap = true
formSheet.shouldCenterVertically = true
do this
let formSheet = MZFormSheetPresentationController(contentViewController: viewController)
formSheet.shouldCenterVertically = true
formSheet.contentViewSize = CGSizeMake(280.0, 280.0)
formSheet.contentViewControllerTransitionStyle = .StyleFade
formSheet.shouldDismissOnBackgroundViewTap = true
Is it possible to set the controller position like the old version? I'd like it to be near the right edge of the screen (not useful on iphone but on ipad a lot!)
Thanks
I Love MZFormSheetPresentationController !!! =)
But I was not happy with the location of the Pop-up'a. It is located just below the Navigation Controller'a. All attempts to move it to the center of the screen does not lead to any success.
My code: