Comments (6)
If you open example you will see that it is wokring, make sure that movementActionWhenKeyboardAppears you have set to MZFormSheetActionWhenKeyboardAppearsDoNothing
from mzformsheetpresentationcontroller.
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.
from mzformsheetpresentationcontroller.
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];
from mzformsheetpresentationcontroller.
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?
from mzformsheetpresentationcontroller.
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
from mzformsheetpresentationcontroller.
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
from mzformsheetpresentationcontroller.
Related Issues (20)
- Set backgroundVisibilityPercentage does not reflect to dimmingView
- Xcode 9 HOT 1
- Doesn't move to top when show keyboard on iOS 11 HOT 4
- This sheet is not layout correct in iOS11, version 2.4.3, but it is correct in version 2.4.2 HOT 1
- ClipsToBounds Problem HOT 4
- Xcode 9.0.1 Warning: MZTransition.h "This block declaration is not a prototype" HOT 2
- Why should Tap for two time on cell in UITableViewCell for show MZ pop up? HOT 1
- Make Form Sheet View cover percentage of entire screen
- How to use the default push animation when navigating within modal view?
- Compiler warnings when switching Deployment Target HOT 2
- Question about a default value?
- MZFormSheetPresentationViewController subclass initializer infinite loop.
- Anyone experiences freezing in iOS 12? HOT 1
- Memory Leak issue HOT 3
- How can I present the dialog on top of ViewController? HOT 1
- iOS 12 ONLY: [_UIAlertControllerAlertPresentationController setBackgroundVisibilityPercentage:]: unrecognized selector sent to instance 0x13130b3b0 -[NSOrderedSet initWithSet:copyItems:] HOT 1
- Crash on allowDismissByPanningPresentedView
- support to Swift Package Manager HOT 5
- How do I set the position of the contentView, for example, at the bottom of the page
- Xcode 13: Building universal frameworks with common architectures is not possible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mzformsheetpresentationcontroller.