目前,我的 Xamarin 表单应用程序中有输入字段,这些输入字段在 iOS 上只有底部边框,可以使用以下自定义渲染器完美运行:
using Xamarin.Forms.Platform.iOS;
using Xamarin.Forms;
using UIKit;
using YOUTNAMESPACE.iOS;
using System.ComponentModel;
using CoreAnimation;
using Foundation;
[assembly: ExportRenderer (typeof(YOUTNAMESPACE.LineEntry), typeof(LineEntryRenderer))]
namespace YOUTNAMESPACE.iOS
{
public class LineEntryRenderer: EntryRenderer
{
protected override void OnElementChanged (ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged (e);
if (Control != null) {
Control.BorderStyle = UITextBorderStyle.None;
var view = (Element as LineEntry);
if (view != null) {
DrawBorder (view);
SetFontSize (view);
SetPlaceholderTextColor (view);
}
}
}
protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged (sender, e); …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过Phonegap构建使用Apple Pay cordova插件。这是我在配置文件中的条目:
<plugin name="cordova-plugin-applepay-stripe" source="npm">
<param name="STRIPE_TEST_PUBLISHABLE_KEY" value="xxxxxxxx" />
<param name="STRIPE_LIVE_PUBLISHABLE_KEY" value="xxxxxxxxx" />
<param name="APPLE_MERCHANT_IDENTIFIER" value="merchant.etc.etc" />
</plugin>
Run Code Online (Sandbox Code Playgroud)
该插件安装正确,但是由于我没有在PC上启用Xcode中的Apply Pay权利,所以该插件无法正常工作。
我知道您可以像在这里一样直接从phonegap构建config.xml文件中编辑plist文件:
<gap:config-file platform="ios" parent="NSPhotoLibraryUsageDescription" overwrite="true">
<string>We are using the Photo Library for PayPal</string>...
Run Code Online (Sandbox Code Playgroud)
所以我的问题是,究竟如何编辑Entitlements.plist文件,以便可以启用ApplePay并添加我的商人ID?
我尝试了以下方法:
<config-file platform="ios" target="*-Entitlements.plist" parent="com.apple.developer.in-app-payments">
<array>
<string>merchant.etc.etc/string>
</array>
</config-file>
Run Code Online (Sandbox Code Playgroud)
但这没有用。任何帮助,将不胜感激!