Tag: xamarin.ios

Monotouch / Xamarin绑定inheritance

我试图为FastPDFKit实现一个monotouch绑定。 我遇到了一个inheritance的构造函数的问题。 我试图从fastPDFKit绑定“ReaderViewController”。 ReaderViewControllerinheritance自从UIViewControllerinheritance的MFDocumentViewController。 我的C# NSUrl fullURL = new NSUrl (fullPath); FastPDFKitBinding.MFDocumentManager DocManager = new FastPDFKitBinding.MFDocumentManager (fullURL); DocManager.EmptyCache (); //line where the errors occur FastPDFKitBinding.ReaderViewController pdfView = new FastPDFKitBinding.ReaderViewController (DocManager); pdfView.DocumentID = PageID.ToString (); Source.PView.PresentViewController(pdfView, true, null); 此代码不会生成,当我使新的ReaderViewController时给我两个错误: Error CS1502: The best overloaded method match for `FastPDFKitBinding.ReaderViewController.ReaderViewController(MonoTouch.Foundation.NSCoder)' has some invalid arguments (CS1502) (iOSFlightOpsMobile) Error CS1503: […]

完成button不被触发在Xamarin Entry上完成的事件

在Xamarin Forms的iOS数字键盘上添加完成button之后,我遇到了另一个问题:完成button没有激发Completed事件(就像返回button一样)。 在我实现这个的方式,我发现Xamarin论坛上的以下代码: using System; using System.Drawing; using System.Reflection; using Xamarin.Forms.Platform.iOS; using Xamarin.Forms; using UIKit; using KeyboardTest.iOS; using KeyboardTest; [assembly: ExportRenderer(typeof(EntryDone), typeof(EntryDoneRenderer))] namespace KeyboardTest.iOS { public class EntryDoneRenderer : EntryRenderer { // used to cache the MethodInfo so we only have the reflection hit once private MethodInfo baseEntrySendCompleted = null; public EntryDoneRenderer () { } […]

Iphone,从MonoTouch获取国家列表

是否有可能复制MonoTouch中的代码? 这是我迄今为止所尝试的: foreach(string countryCode in NSLocale.ISOCountryCodes){ // How to convert this objective-c code to c#? // [[NSLocale currentLocale] displayNameForKey:NSLocaleCountryCode value:countryCode] }

iOS corebluetooth数据发送问题

我正在使用corebluetooh api发送数据到蓝牙设备。 在Android上它的工作正常,但在iOS上它不工作。 我正在发送数据如下 public override void DiscoveredCharacteristic(CBPeripheral peripheral, CBService service, NSError error) { System.Console.WriteLine("Discovered characteristics of " + peripheral); foreach (var characteristic in service.Characteristics) { Console.WriteLine("Write Value of characteristic " + characteristic.ToString() + " is " + characteristic.Value); var str = characteristic.UUID.ToString(); if (str.ToLower() == "00C957FB-8F6F-4E08-9ACB-000000000004".ToLower()) { var hh1 = NSData.FromArray(new byte[] { 0x03, […]

在Xamarin.iOS中创build一个Qt视图

我试图在Xamarin.iOS项目中使用基于Qt的库 。 作为第一步,我想 初始化一个简单的Qt视图和 把它放在一个空的ViewController中。 我已经设法将iOS项目与QtCore和QtGui链接起来。 现在我正努力用相应的C#调用来绑定Qt的C ++方法。 有没有人与Xamarin 和 Qt的组合? 这是否是要走的路? (我能在网上find的关于Xamarin 与 Qt …)

Monotouch / iOS:哪个地方是取消订阅委托最好的地方

iOS中订阅事件的最好方法是ViewDidLoad,但是当closures视图时,不会调用ViewDidUnload()(仅当内存警告时)。 哪个地方最好取消订阅活动? (在subviewController中我订阅了一个引用MainViewController的事件,当打开子视图两次,我收到两个事件触发器,因为viewdidunload()中的取消订阅从不会被调用。 如何在ViewWillAppear / ViewWillDisapper中订阅/取消订阅? public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); this.mBL.OrderChanged += HandleOrderChanged; } public override void ViewWillDisappear (bool animated) { base.VieWillDisappear (animated); if (this.mBL!=null) this.mBL.OrderChanged -= HandleOrderChanged; }

MonoTouch iOS FLAC文件语音识别

我正在编写iOS应用程序,应用程序可以通过MonoTouch识别用户的语音。 我需要使用麦克风并将语音文件转换为FLAC格式,才能将其发送到Google Speech API。 是否有任何库/代码示例,或者是否有可能使用MonoTouch为iOS创buildSpeech-Recognition应用程序,例如Google Speech API ? 或者有可能将audio输出(.caf文件)转换为.flac文件?

在Xamarin ios中以不同的样式(List,Grid,Blocks)显示项目?

我是新来的xamarin ios。 我想在视图控制器中以不同的样式(列表,网格,块)显示项目。 我尝试与表格视图单元格,但我无法使其正确。 请find下面的图片。 当我们点击图标(列表图标,网格图标,块图标)时,我们需要在同一视图控制器中显示不同的样式视图。 请告诉我如何使它成为可能。 提前致谢。

MonoTouch中的CoreImage不会从有效资产中返回有效的图像

我正在尝试使用此图像来获取图像。 img = new UIImage(new MonoTouch.CoreImage.CIImage(validAssetObject),1.0f, UIImageOrientation.Up); CIImage是从CIImage调用返回的。 新的UIImage具有CIImage属性= null 。 看起来像UIImage的构造函数不能按预期工作? MonoTouch社区的任何想法?

MonoTouch – XCode组织者中更好的控制台输出

我们一直在玩新的MonoTouch NUnittesting项目,这是相当不错的。 我们已经在CI软件的Windows上运行了这些testing中的一些,我们在控制台上打印了大量的东西,看看在testing过程中出了什么问题。 如果我们为MonoTouch构build并运行这些testing,并在XCode的组织者中查看控制台,那么看起来很丑陋: Feb 20 10:34:57 unknown UIKitApplication:com.ourcompany.ourapp[0xab78][8329] <Notice>: [Our usually pretty rainbows and unicorn console output here] 有没有办法在iOS中清理这个输出? 至less用更有意义的东西replace“未知”,或者将其完全移除和UIKitApplication将会很好。 此外,我们不介意以某种方式调用NSLog而不是Console.WriteLine如果它能解决这个问题。