Giter VIP home page Giter VIP logo

Comments (6)

m1entus avatar m1entus commented on May 18, 2024

If you open example you will see that it is wokring, make sure that movementActionWhenKeyboardAppears you have set to MZFormSheetActionWhenKeyboardAppearsDoNothing

from mzformsheetpresentationcontroller.

SadhuRus avatar SadhuRus commented on May 18, 2024

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.

SadhuRus avatar SadhuRus commented on May 18, 2024

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.

lumucheng avatar lumucheng commented on May 18, 2024

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.

lumucheng avatar lumucheng commented on May 18, 2024

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.

klauslanza avatar klauslanza commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.