小编kos*_*kos的帖子

如何将UIKeyboardType.NumberPad的设计更改为Xamarin.iOS/Monotouch中的自定义设计?

我有一个定制设计的xamarin.ios应用程序,并希望使键盘适应我的设计.所以我试图连接UIKeyboardType.NumberPad的自定义设计,类似于下图.我该怎么做?谢谢

在此输入图像描述

keyboard xamarin.ios ios xamarin

3
推荐指数
1
解决办法
636
查看次数

即使在运行HelloWorld_IPhone monotouch时,仪器中也会泄漏物体

我的应用程序永久收到内存警告,我真的找不到导致它的原因.即使我将应用程序剥离到最低限度,我也遇到了严重的泄漏.所以我想从单触摸示例编译默认的HelloWorld_IPhone应用程序,看看我是否得到了相同的泄漏.事实证明我做到了.真让我困惑.

在此输入图像描述

应用程序启动后会出现泄漏(红色条填满整个列).

泄露的对象:Malloc 16 Bytes,Responsible Library:HelloWorld_IPhone,负责框架:mono_dl_open

我的问题是这是否正常或我是否遗漏了什么?

编辑:在调试模式下在我的设备上运行TweetStation应用程序时仪器输出的屏幕截图!与我的应用程序结果相同.肯定有些事情不对吗?在我的设备上运行TweetStation应用程序时,仪器输出的屏幕截图

memory-leaks memory-management instruments xamarin.ios ios

2
推荐指数
1
解决办法
2194
查看次数

monotouch DialogViewController 更改元素的顺序

我目前正在使用 Monotouch.Dialog 中概述的高级编辑 tableview,它允许用户删除和编辑 table 元素的标签。有没有办法丰富 tableview 以实现类似于屏幕截图的内容,即更改排序?

重新排列表格元素的顺序

xamarin.ios monotouch.dialog

2
推荐指数
1
解决办法
756
查看次数

作为monotouch.dialog的一部分,动态更改ImageStringElement中的图像

我的问题如下:我正在创建一个包含多个ImageStringElements的部分,当选择一个音频文件时,它会播放,例如

Section s = new Section(); 
foreach (var idea in ideas)
{
    s.Add(new ImageStringElement(idea.Id, delegate {ElementTapped();}, playImage));
}
Run Code Online (Sandbox Code Playgroud)

现在当点击其中一个元素时,我想将playImage更改为另一个元素,即PauseImage.然后,当它被选中时,它会变回PlayImage.不知道如何在ElementTapped()方法中执行此操作.基本上我想拥有与语音备忘录应用程序类似的功能.

xamarin.ios monotouch.dialog

1
推荐指数
1
解决办法
765
查看次数

XSLT转换:如何在转换期间保留元素的属性?

我在C#中有一个函数来获取XML数据并使用XSLT样式表对其进行排序,然后返回已排序的数据并将其放入XMLDocument对象中.XSLT将无错误地处理数据,但它不会正确返回所有数据.如您所见,CarerContent的属性缺失.

这是XSLT:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
  <xsl:template match="MatchedSources">
    <xsl:copy>
      <xsl:apply-templates>
         <xsl:sort data-type="number" order="descending" select="OverallMatchValue"/>
         </xsl:apply-templates>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="*">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
Run Code Online (Sandbox Code Playgroud)

输入XML数据如下所示:

<?xml version="1.0"?>
<MatchedSources responseId="1" dataSourceType="Document">
    <MatchedSource>
        <SourceId>1001</SourceId>
        <DifferentPerspectives>
            <Carer>
                <CarerContent id="1" title="text">content</CarerContent>
                <CarerContent id="2" title="text">content</CarerContent>
            </Carer>
        </DifferentPerspectives>
        <OverallMatchValue>45</OverallMatchValue>
    </MatchedSource>
   <MatchedSource>
        <SourceId>1002</SourceId>
        <DifferentPerspectives>
            <Carer>
                <CarerContent id="1" title="text">content</CarerContent>
                <CarerContent id="2" title="text">content</CarerContent>
            </Carer>
        </DifferentPerspectives>
        <OverallMatchValue>78</OverallMatchValue>
    </MatchedSource>
</MatchedSources>
Run Code Online (Sandbox Code Playgroud)

结果输出XML:

<?xml version="1.0"?>
<MatchedSources responseId="1" dataSourceType="Document">
    <MatchedSource>
        <SourceId>1002</SourceId>
        <DifferentPerspectives>
            <Carer>
                <CarerContent id="1" title="text">content</CarerContent>
                <CarerContent id="2" title="text">content</CarerContent>
            </Carer>
        </DifferentPerspectives>
        <OverallMatchValue>78</OverallMatchValue>
    </MatchedSource>
   <MatchedSource>
        <SourceId>1001</SourceId> …
Run Code Online (Sandbox Code Playgroud)

c# xml xslt

1
推荐指数
1
解决办法
1638
查看次数