【发布时间】:2016-08-01 01:53:44
【问题描述】:
问题是,当一个类继承了 PayPalPaymentDelegate 时,我在启动屏幕之后会出现黑屏仅。
起初我以为是我的 PayPalMobile 绑定,所以我使用了 Alejandro 的 PayPalMobile binding。我使用他的绑定和我的绑定得到了相同的结果。
我运行了Alejandro sample app,它运行良好。我不知道为什么我的黑屏。
什么可能导致我的项目出现此问题?
到目前为止我做了什么:
我将部署目标从 8.4 更改为 9.2,并将主界面从 none 更改为 LoginViewController 并收到相同的问题。
制作了一个新的解决方案,添加了我的 PayPalMobile 绑定,并且成功了。
根视图控制器在进入黑屏之前会显示。
所以,解决方案中出现了问题,我不知道是什么原因。
环境:
我使用的是最新的 PayPal 手机
使用 Xamarin Studio 5.10.2
使用 iPhone 6s 9.2 模拟器
Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Test</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>9.2</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>MKDirectionsRequest</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.maps.directionsrequest</string>
</array>
</dict>
</array>
<key>MKDirectionsApplicationSupportedModes</key>
<array>
<string>MKDirectionsModeCar</string>
</array>
<key>XSLaunchImageAssets</key>
<string>Resources/Images.xcassets/LaunchImage.launchimage</string>
<key>CFBundleIdentifier</key>
<string>email@yahoo.com</string>
<key>UIMainNibFile</key>
<string>LoginViewController</string>
</dict>
</plist>
【问题讨论】:
-
UIApplication.SharedApplication.KeyWindow.RootViewController的值是多少?它应该是您的自定义UIViewController。该对象的View属性的值是多少?那应该是您的根UIView(全黑)。ViewsFrame属性的价值是多少?尝试将其设置为UIScreen.MainScreen.Bounds -
谢谢,但我发现了问题。在 AppDelegate 中,我将 UIWindow 类作为替代,并且它起作用了
标签: ios paypal xamarin xamarin.ios