草庐IT

nested-properties

全部标签

ios - React Native - 无法构建 DependencyGraph :Cannot read property 'root' of null

我试图让ReactNative第一次运行他们的helloworld应用程序(AwesomeProject),但我在控制台中收到此错误:FailedtobuildDependencyGraph:Cannotreadproperty'root'ofnullTypeError:Cannotreadproperty'root'ofnullatindex.js:16:60attryCallOne(/Users/Eduardo/Documents/Code/Personal/ReactNative/AwesomeProject/node_modules/promise/lib/core.js:37

ios - Swift Vapor 服务器 : how to return nested dictionaries in get request?

我开始在Xcode中使用Vapor来构建一个简单的服务器来支持我的应用程序。我试图了解如何正确构建我可以在get请求中返回的JSON对象。我有以下内容:drop.get{requestinletdate:TimeInterval=Date().timeIntervalSince1970letdictionary:[String:String]=["name":"e2","age":"3"]returntryJSON(node:["time":date,"t1":"abc","t2":dictionary])}这不起作用,它告诉我“参数标签(节点:)不匹配任何可用的重载”如何构建包含字符

ios - Mapkit didSelectAnnotationView : How to get at custom properties?

我试图在用户点击图钉时打开详细ViewController。我还定义了一个自定义注释,我想将它的一些信息传递到详细ViewController中。它看起来像这样:@interfaceSquatAnnotationClass:NSObject{NSString*name;NSString*address;NSString*gendered;NSString*availability;NSString*directions;NSString*commments;CLLocationCoordinate2Dcoordinate;}@property(nonatomic,readonly)CL

ios - 错误 : "nested pop animation can result in corrupted navigation bar"

我尝试从表中获取单元格的文本(在ViewControllerB中)并将其显示在textView中(在ViewControllerA中)。第一次一切都很好,但是第二次在控制台中出现错误消息:“嵌套的弹出动画会导致损坏的导航栏在意外状态下完成导航转换。导航栏subview树可能会损坏。”我的代码是:在ViewControllerB中-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath{//Retrievethevalueofcellselectedself.valeur

ios - CATransformLayer : changing property masksToBounds in transform-only layer, 将无效

我正在使用Xcode7和swift2。在我的iPadAir,iOS9.1上,当键盘出现时,调试控制台会抛出一个错误2015-10-2813:07:35.114Note[73896:6954126]-changingpropertymasksToBoundsintransform-onlylayer,willhavenoeffect2015-10-2813:07:35.115Note[73896:6954126]-changingpropertymasksToBoundsintransform-onlylayer,willhavenoeffect2015-10-2813:07:35.11

ios - 只读公共(public),读写私有(private)属性(property)

我看到了这个thread,但在iOS7中并不完全清楚,因为编程指南说您可以省略属性的@synthese关键字。我想要一个@property,它在外部是readonly,但在内部是readwrite。我可以像这样只使用@property关键字吗?编辑:在所提供的答案中,什么会被认为更正确,或者至少更惯用。要在类扩展中拥有单独的readwrite属性还是在实现中直接访问ivar?编辑:按照答案中的建议表明我正在使用类扩展。//.h@interfaceCACustomerAuthenticator:NSObject@property(nonatomic,copy,readonly)NSStr

ios - Objective-C : Is there a built-in way to count the total number of items in a 2d/nested NSArray?

我在ObjectiveC中有一个二维的NSArray。我想知道数组中项目的总数。在不使用嵌套for循环的情况下,是否有更快的方法来获取项目的总数?谢谢! 最佳答案 是的,你可以做这个键值编码和thecollectionoperators:NSArray*nested=@[@[@1,@2,@3],@[@4,@5,@6],@[@7,@8,@9],@[@10,@11,@12],@[@13,@14,@15],@[@16,@17,@18],@[@19,@20,@21],@[@22,@23,@24]];NSLog(@"%@",[nestedva

ios - Application.Current.properties 在最新的 xamarin 表单版本中被破坏了吗?

由于我已将我的xamarin安装更新为xamarin4,因此在iOS上跨session保存本地属性不起作用。所以如果我有Application.Current.Properties.Add("key",value);Application.Current.SavePropertiesAsync();当应用程序关闭并重新启动时,它不会保存任何内容。任何指针? 最佳答案 这是通过不按原样保存复杂对象,而是使用JsonConvert将它们序列化为字符串然后存储字符串来解决的。这一直有效。当你想再次取回对象时,只需将字符串反序列化为对象类型

ios - react native : SyntaxError: Strict mode does not allow function declarations in a lexically nested statement

从ReactNative0.22.2升级并升级了一些插件后,我开始在iOS上遇到此错误。我试过降级并重新安装所有东西,但我无法摆脱修复它。其他人遇到过这个:SyntaxError:Strictmodedoesnotallowfunctiondeclarationsinalexicallynestedstatement.更新#1:除了还原模块之外,我还注释掉了任何'usestrict';我更新的内容之一是npm和node。我正在运行节点v5.3.0和npmv3.8.3。我不记得我有什么版本...更新#2:有我在ReactNative中使用的模块:"dependencies":{"deep

ios - 台风不注入(inject)属性(property)(无 Storyboard)

我无法使用带有initWithNibName:bundle:的XIB将属性注入(inject)到ViewController中例子:这是我的程序集:@implementationAppAssembly-(ViewControllerC*)viewControllerC{return[TyphoonDefinitionwithClass:[ViewControllerCclass]configuration:^(TyphoonDefinition*definition){[definitioninjectProperty:@selector(name)with:@"Injectedstr