Paypal Lib:方向问题

发布于 2024-10-09 21:00:21 字数 246 浏览 0 评论 0原文

我已将 Paypal 库集成到我的应用程序中。参考:https://www.x.com/community/ppx/xspaces/mobile /mep

我的应用程序处于横向模式,当呼叫 paypal 时,屏幕变为纵向模式。

无论如何,有没有办法覆盖这种行为。

谢谢。

I have integrated Paypal lib in my application. Ref : https://www.x.com/community/ppx/xspaces/mobile/mep

My application is in landscape mode, when give call to paypal,screen comes in portrait mode.

is there anyway to override this behavior.

thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

咆哮 2024-10-16 21:00:21

在与 PayPal 的技术人员交谈后,以下是我得到的答复

付款部分仅适用于纵向模式。这是为了避免过度滚动而做出的设计决定。

After having talk with Tech guy from PayPal,following is the response I got

The payment portion works only in portrait mode. This was a design decision to avoid undue scrolling.

清引 2024-10-16 21:00:21

在我在 PayPal MPL 文档中看到该行之后,我认为不可能以横向模式显示复选框视图。幸运的是,有一种方法可以手动完成。感谢我的同事:)

复选框视图是 PayPalViewClass 的一个实例。只需添加一个方法来遍历所有视图和所有子视图即可找到此类的实例。找到所需的视图后,只需对其应用 setTransform 方法即可。该方法应如下所示:

-(void) cicle:(UIView*)v{ 
    for (UIView *_v in [v subviews]) {
       if ([_v isKindOfClass:[NSClassFromString(@"PayPalViewClass") class]]) {
         [v setTransform:CGAffineTransformMakeRotation(-M_PI/2)];
       }
       [self cicle:_v];
    }
}

应在 payWithPayPal 方法中调用它。我希望这有帮助;)

After I've come across that line in documentation of PayPal MPL, I thought it was impossible to show the checkbox view in landscape mode. Fortunately there is a way to do it manually. Thanks to my colleagues :)

The checkbox view is an instance of PayPalViewClass. Just add a method to look through all the views and all the subviews to find the instanse of this class. Once you've found the view you was looking for just apply setTransform method to it. The method should look like this:

-(void) cicle:(UIView*)v{ 
    for (UIView *_v in [v subviews]) {
       if ([_v isKindOfClass:[NSClassFromString(@"PayPalViewClass") class]]) {
         [v setTransform:CGAffineTransformMakeRotation(-M_PI/2)];
       }
       [self cicle:_v];
    }
}

It should be called in your payWithPayPal method. I hope this helps ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文