我正在写一个Ionic应用程序,但是我遇到了很多问题.特别是一个问题是当我尝试使用命令添加phonegap-push-plugin时
sudo ionic plugin add phonegap-plugin-push
Run Code Online (Sandbox Code Playgroud)
我得到以下错误:
Error: CocoaPods was not found. Please install version 1.0.1 or greater from https://cocoapods.org/
Run Code Online (Sandbox Code Playgroud)
我显然尝试安装此软件,因为错误建议,但我无法在任何地方找到版本1.0.1.
我也想了解这是什么需要以及为什么Ionic认为它需要它.
非常感谢
我有一个带有 2 个按钮的自定义视图 - 一个在左侧,一个在右侧。
我想要一个可绑定的属性来指示每个按钮将调用哪个函数,但我想要调用的函数是在原始内容页面中,而不是在自定义控件中。
我知道您不能将 void 作为可绑定属性,所以我不确定如何实现这一点。
这是我的自定义控件 xaml:
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="EngineerApp.HeaderBar" HeightRequest="50">
<BoxView x:Name="banner" BackgroundColor="#edeff2"
RelativeLayout.WidthConstraint="{ ConstraintExpression
Type=RelativeToParent,
Property=Width,
Factor=1 }"
RelativeLayout.HeightConstraint="{ ConstraintExpression
Type=RelativeToParent,
Property=Height,
Factor=1 }">
</BoxView>
<Button
Text="Left"
x:Name="btnLeft"
Style="{StaticResource headerBarButton}"
RelativeLayout.WidthConstraint="{ ConstraintExpression
Type=RelativeToView,
ElementName=banner,
Property=Width,
Factor=0.5 }"
RelativeLayout.HeightConstraint="{ ConstraintExpression
Type=RelativeToView,
ElementName=banner,
Property=Height,
Factor=1 }"
>
</Button>
<Button
Text="Right"
Style="{StaticResource headerBarButton}"
RelativeLayout.XConstraint="{ ConstraintExpression
Type=RelativeToView,
ElementName=banner,
Property=Width,
Factor=0.5,
Constant=1
}"
RelativeLayout.WidthConstraint="{ ConstraintExpression
Type=RelativeToView,
ElementName=banner,
Property=Width,
Factor=0.5 }"
RelativeLayout.HeightConstraint="{ ConstraintExpression
Type=RelativeToView,
ElementName=banner,
Property=Height, …
Run Code Online (Sandbox Code Playgroud)