问题标签 [xamarin.ios]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
5876 浏览

iphone - MonoTouch 是一个可行的 iPhone 开发平台吗?

MonoTouch 似乎是 iPhone 开发的绝佳平台,但我担心将其部署到 Apple Store。iTunes 上是否有任何使用它构建的应用程序示例?

我们正在为 iPhone 启动一个新项目,将整个堆栈保留在 C# 中会很棒,但我们不想冒因 MonoTouch 而被 Apple 商店拒绝的风险。

我已经阅读了几款目前使用单声道(不是 MonoTouch)进行 3D 图形的游戏,但找不到任何关于 MonoTouch 的信息。

0 投票
3 回答
2793 浏览

iphone - 将 NSArray 与 Monotouch 一起使用

如何在 C# (Monotouch) 中将项目插入 NSArray 对象?我没有找到合适的方法吗?在 Objective-C 方面,有一个名为“initWithObjects”的构造函数,但我在 C# 方面没有找到它。

绒球

0 投票
2 回答
2331 浏览

iphone - MonoTouch 的替代语言

MonoTouch 总是与 C# 一起被提及。框架和工具集实际上是否仅限于 C#,或者 IronRuby 和 F# 等其他 CLR 语言也可以工作?

0 投票
1 回答
537 浏览

iphone - 更新 UIImage 不起作用

我在视图的 ViewDidLoad() 方法中加载图像,如下所示:

(其中 imgMonthGraph 是 UIImageView) 上面的代码有效。

但是,我需要在稍后阶段(不在 ViewDidLoad() 内部)将另一个图像加载到同一个 UIImageView。我正在使用以下代码:

上面的代码不起作用,因为图像没有更新。我尝试在图像、图像视图和视图上运行 SetNeedsDisplay() -methdod。似乎没有任何帮助。

有些东西需要刷新,但是什么?

绒球

0 投票
4 回答
1057 浏览

iphone - iPhone 的类似 Web 的标签

在 iPhone 上实现看起来像 Web 应用程序的选项卡的最佳方法是什么,如下面的屏幕截图(注意“Checkin-Info-Friends”选项卡)?这些不是 UIKit 标准库的一部分,但最近似乎很常见。

我花了相当多的时间为 iPhone 开发应用程序,但没有开发类似的控件。这里最好的方法是什么:

  • 为每个标签内容创建一个新的 UIView,并立即将三个子视图添加到主视图?
  • 仅当用户单击每个选项卡时才创建新的 UIViews?
  • 将所有内容放在 UIScrollView 中,并在用户单击每个选项卡时更改页面?

也许那里有开源控件?我什么也找不到。

替代文字
(来源:foursquaregame.com

0 投票
1 回答
2378 浏览

iphone - UITableView 水平单元格分隔线不会向上或向下滚动

我已经编写了一些 MonoTouch 代码来显示一个 Nib'less UITableView,并且在初始显示时,该视图看起来还可以填充单元格数据。但是,当我触摸向下滚动以查看更多数据时,我最终会得到一个双网格模式,其中包括不随滚动动作移动的静态水平单元格分隔线加上另一组或水平单元格分隔线,它们的间距正确并随着移动向下滚动动作。

向上滚动到表格视图的顶部后,静态和动态水平完美同步,屏幕看起来正常。进一步滚动会重现问题。

我正在使用默认 UITableViewCell 对象来填充表格行。

我可能无法配置 Interface Builder 通常会做的事情。有任何想法吗?希望 Objective-C 的人能够解释 .Net 代码。

更新 1:我担心额外的一组水平单元格分隔线从导航控制器堆栈中呈现的前一个视图中渗出。所以我重新订购了应用程序,使有问题的表格成为应用程序启动时显示的第一个视图,但问题仍然存在。

更新 2:添加

这避免了双组水平线,但当表格视图滚动时,我仍然留下与单元格中间相交的静态水平线。

更新 3:有一个模糊的理论,这与单元格高度配置不匹配或背景填充问题有关,因此水平线可能代表表格视图中未绘制的像素。我不知道如何检验这个理论?

0 投票
1 回答
105 浏览

iphone - 现有 Objective-C 应用程序中的 Monotouch 框架

我想使用我现有的objective-c UI 层,但调用objective-c 中的一些单点触控功能。我怎样才能做到这一点?

0 投票
1 回答
745 浏览

iphone - MonoTouch 和 iPhone 静态库

MonoTouch 是否允许创建 iPhone 静态库?如果是的话怎么做?

0 投票
1 回答
2070 浏览

multithreading - PerformSelector 单点触控线程

使用此语句会立即调用选择器,而不是从现在开始 6 秒。

有谁知道如何让它延迟工作?

thread.Sleep(6000)在被调用的函数中使用,但整个应用程序锁定了六秒钟。

谢谢。

0 投票
1 回答
782 浏览

iphone - 来自 monotouch 的 Web 服务访问错误(iphone 调试)

具有 web 服务 (C#) 访问权限的应用程序在 MAC(iphone 模拟器)上运行良好,但在 iphone (发布和调试模式)上不起作用。当我尝试创建一个新的 web 服务实例时会发生这种情况。

会不会是 Monotouch iphone 运行时错误?有什么办法可以解决吗?

加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/monotouch.dll 加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB /YNSMS.app/Mono.Security.dll 加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.dll 加载程序集:/private/var/mobile/Applications /47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.Xml.dll 加载的程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.Web。 Services.dll 加载的程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/AddressBookExample.exe 线程已启动:将“MainView.xib.cs:70”处的挂起断点解析为 Void AddressBookExample.MainView:ExecutaBotao ():0。* 断言在 ../../../..

在(包装器托管到本机) System.MonoCustomAttrs.GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0xffffffff> 在 System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider,System.Type) <0x0006c>在 System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider,bool) <0x00037> 在 System.Reflection.MonoField.GetCustomAttributes (bool) <0x00023> 在 System.Xml.Serialization.XmlAttributes..ctor (System.Reflection.ICustomAttributeProvider) <0x0009f> 在 System.Xml.Serialization.XmlReflectionImporter.GetReflectionMembers (System.Type) <0x004ef> 在 System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string) <0x001df> 在 System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string) <0x000e3> 在 System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Type,System .Xml.Serialization.XmlRootAttribute,string) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportListMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string,System.Xml.Serialization.XmlAttributes,int ) <0x00743> 在 System.Xml.Serialization.XmlReflectionImporter.ImportListMapping (System.Type,System.Xml.Serialization.XmlRootAttribute,string,System.Xml.Serialization.XmlAttributes,int) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter .CreateMapMember (System.Type,System.Xml.Serialization.XmlReflectionMember,string) <0x0093b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool,bool,bool,System.Xml.Serialization.XmlMappingAccess) <0x00097> 在System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool,bool,bool) <0x0006b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System. Xml.Serialization.XmlReflectionMember[],bool,bool) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool) <0x0004b> 在 System.Web。 Services.Protocols.SoapMethodStubInfo..ctor (System.Web.Services.Protocols.TypeStubInfo,System.Web.Services.Protocols.LogicalMethodInfo,object,System.Xml.Serialization.XmlReflectionImporter,System.Xml.Serialization.SoapReflectionImporter) <0x006bb> 在 System.Web.Services.Protocols.SoapTypeStubInfo.CreateMethodStubInfo (System.Web.Services.Protocols.TypeStubInfo, System.Web.Services.Protocols.LogicalMethodInfo,bool) <0x0016b> 在 System.Web.Services.Protocols.TypeStubInfo.BuildTypeMethods () <0x00127> 在 System.Web.Services.Protocols.TypeStubInfo.Initialize () <0x00023> 在System.Web.Services.Protocols.LogicalTypeInfo.GetTypeStub (string) <0x00167> 在 System.Web.Services.Protocols.TypeStubManager.GetTypeStub (System.Type,string) <0x0002f> 在 System.Web.Services.Protocols.SoapHttpClientProtocol。 .ctor () <0x0003b> 在 AddressBookExample.MainView 的 YNSMS.ynSMSws.Service1..ctor ()。ExecutaBotao (object,System.EventArgs) [0x00000] in /Volumes/STORAGE/cafexpto/Marcelo/sistemas_mac/MonoTouch/AddresBook/AddressBookExample/MainView.xib.cs:70 在 MonoTouch.UIKit.UIBarButtonItem/Callback.Call (MonoTouch.Foundation .NSObject) <0x0005b> at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3> at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[] ,intptr,intptr) <0xffffffff> 在 MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000e0> 在 MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023> 在 AddressBookExample.Application.Main (string[]) [0x00000] 在 /Volumes/STORAGE/cafexpto/Marcelo/sistemas_mac/MonoTouch/AddresBook/AddressBookExample/Main.cs:14 在(包装运行时调用)对象。runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3>

本机堆栈跟踪:

* 断言:不应在 ../../../../mono/mini/mini-darwin.c:258 到达