Tag: xamarin.ios

是否有像XCode的MonoTouch的OpenGL帧捕获?

自XCode 4.2以来,XCode的“帧捕获”function就在这里。 在MonoTouch中是否有类似的function,或者是否可以在MonoTouch项目中利用XCode的function? @ Xamarin人:如果没有,是否有任何计划来支持这样的事情?

MonoTouch.Dialog:EntryElement的背景颜色

MonoTouch.Dialog EntryElement的背景颜色是EntryElement改变的?

Xamarin.iOS中的自定义SQLite函数

我正在Xamarin.iOS上处理Sqlite的自定义函数。 我从这里得到的答案: 在给定的半径(Xamarin.Android)在地图上显示标记,但我遇到了问题 尝试使用–aot-only运行时JIT编译方法'(包装本机到托pipe)Mono.Data.Sqlite.SqliteFunction:ScalarCallback(intptr,int,intptr)'。 在栈上search后,我发现这里是一个解决scheme: 自定义函数SQLite与单声道,但解决scheme提到有我很难理解。 我不知道如何使用MonoPInvokeCallbackAttribute注释方法,并将其设置为静态,因为SqliteFunction类中的方法被覆盖,所以不能使其为静态。 如果有人能够帮助我理解该解决scheme或提供解决scheme中缺less的步骤,那将是非常好的。

如何在iOS ViewCellRenderer中更改窗体ViewList的MenuItem颜色?

有没有办法改变Xamarin.Forms Xaml文件中添加的ContextAction菜单的颜色。 IsDestructive="True"将菜单颜色设置为红色。 但我需要另一个菜单看起来像绿色或其他颜色。 这是我的Forms Xaml代码 <ListView x:Name="planList" ItemsSource="{x:Static local:SampleData.PLAN_DATA}" RowHeight="150" HorizontalOptions="FillAndExpand"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <ViewCell.ContextActions> <MenuItem Clicked="OnEditClick" Text="Edit" CommandParameter="{Binding .}"/> <!– THIS HAS TO BE GREEN COLOR –> <MenuItem Clicked="OnDeleteClick" Text="Delete" IsDestructive="True" /> </ViewCell.ContextActions> <ViewCell.View> <StackLayout Orientation="Vertical" HorizontalOptions="Start" VerticalOptions="FillAndExpand"> <!–Non Editable State–> <StackLayout Orientation="Horizontal" Spacing="28" IsVisible="{Binding isNotSaveState}"> <Frame WidthRequest="130" HeightRequest="50" BackgroundColor="#151617" HorizontalOptions="Start"> <Label Text="{Binding […]

使用Mono Touch在循环中使用CGImage.ScreenImage时出现内存问题

我正在尝试创build一个应用程序来读取中兴的Monotouch和C#端口的QR码,但我正在处理内存问题。 当应用程序处理捕获的屏幕帧时,应用程序会收到内存警告,然后closures。 我已经删除了Zxing的调用,以追踪内存问题的源头,并可以通过捕获屏幕图像循环来重现问题。 这里是代码: using System; using System.Drawing; using System.Collections.Generic; using System.Threading; using MonoTouch.UIKit; using MonoTouch.Foundation; using MonoTouch.CoreGraphics; using com.google.zxing; using com.google.zxing.common; using System.Collections; using MonoTouch.AudioToolbox; using iOS_Client.Utilities; namespace iOS_Client.Controllers { public class CameraOverLayView : UIView { private Thread _thread; private CameraViewController _parentViewController; private Hashtable hints; private static com.google.zxing.MultiFormatReader _multiFormatReader = null; private static RectangleF […]

OpenGL ES 2.0 / MonoTouch:纹理呈红色

我正在将一个立方体贴图加载到我的应用程序中,但显示为红色。 编辑:使用2D纹理时,通道问题也存在,看起来通道的顺序不正确。 有没有办法改变使用iOS方法的渠道的顺序? 这是纹理加载的代码: public TextureCube (Generic3DView device, UIImage right, UIImage left, UIImage top, UIImage bottom, UIImage front, UIImage back) : base(device) { _Device = device; GL.GenTextures (1, ref _Handle); GL.BindTexture (TextureType, _Handle); LoadTexture(All.TextureCubeMapPositiveX, right); LoadTexture(All.TextureCubeMapNegativeX, left); LoadTexture(All.TextureCubeMapPositiveY, top); LoadTexture(All.TextureCubeMapNegativeY, bottom); LoadTexture(All.TextureCubeMapPositiveZ, front); LoadTexture(All.TextureCubeMapNegativeZ, back); GL.TexParameter(All.TextureCubeMap, All.TextureMinFilter, (Int32)All.LinearMipmapLinear); GL.TexParameter(All.TextureCubeMap, All.TextureMagFilter, (Int32)All.Linear); GL.GenerateMipmap(All.TextureCubeMap); } private void […]

Xamarin.iOS / Akavache工作示例

有没有人愿意分享一个在Xamarin.iOS项目中使用Akavache的工作示例(理想情况下,没有任何其他的UI框架添加,尽可能的裸骨)实现一个自定义的EncryptionProvider以便安全caching实际上被encryption。 为了澄清,我想示例显示如下: 使用Xamarin.iOS来构build一个简单的iOS应用程序 使用Akavache来caching数据 将Akavache的BlobCache.Secure或SQLiteEncryptedBlobCache与自定义EncryptionProvider实现一起使用,以在数据静止时保持caching的数据encryption 谢谢你的帮助。 结论: 在下面的例子的帮助下,我得到了我的testing解决scheme的工作,并在这里分享给任何人在未来可能会有所帮助: https : //github.com/dmitrysamuylov/xamarin-ios-akavache-secure-example

如何在Monotouch中绑定NSObject <EAAccessoryDe​​legate>?

我有以下的Obj-C .h,绑定的正确方法是什么? @interface iSmart : NSObject<EAAccessoryDelegate>{ id<iSmartDelegate> delegate; } @property(nonatomic, assign) id<iSmartDelegate> delegate; -(id)init; @end __________________________________________________________________________________________ @class iSmart; @protocol iSmartDelegate <NSObject> -(void) iSmartDidConnect; -(void) iSmartDidDisconnect; -(void) cardStatusChanged:(unsigned char)status; @end __________________________________________________________________________________________ 在这一刻,我有这个协议和接口: [BaseType (typeof(NSObject))] [Model] interface iSmartDelegate { [Export("iSmartDidConnect")] void iSmartDidConnect(); [Export("iSmartDidDisconnect")] void iSmartDidDisconnect(); [Export("cardStatusChanged:")] void CardStatusChanged(Byte status); } [BaseType (typeof (EAAccessoryDelegate), Delegates=new string [] { […]

iOS中的UIWebViewcaching

我在我的应用程序托pipeUIWebView 。 它看起来像UIWebViewcaching图像和数据本身。 我想清除应用程序启动时的caching。 清理Safari的caching没有帮助。 我发现刷新UIWebView的caching的唯一方法是closures我的iPhone并再次打开它。 closures应用程序也没有帮助。 苹果的文档没有提到它,或者我错过了一些东西。 以防万一,应用程序是用monotouch创build的。

从UITapGestureRecognizer中移除目标

我已经为我的手势识别器添加了一个匿名方法的动作 UITapGestureRecognizer tapGesture = new UITapGestureRecognizer (); tapGesture.AddTarget (() => HandleTap (tapGesture)); 我怎样才能删除目标? UIGestureRecognizer.Token是必需的。