草庐IT

Set_theory

全部标签

iOS 自动布局 : Set the trailing space equal to the width of the superview

我需要使用自动布局将View定位在其父View的右边界之外。我试图通过指定以下NSLayoutConstraint来做到这一点:NSLayoutConstraint*leftConstraint=[NSLayoutConstraintconstraintWithItem:self.downloadViewattribute:NSLayoutAttributeLeftrelatedBy:NSLayoutRelationEqualtoItem:self.contentViewattribute:NSLayoutAttributeWidthmultiplier:1.0constant:0.0

ios - "loaded the "XXX "nib but the view outlet was not set."- 再次

首先我检查了关于这个主题的所有其他问题:提供的答案似乎是:确保将文件的所有者设置为自定义ViewController类(我已这样做)确保你有一个从View到文件所有者(我有)的引用导出我的代码被编译成一个静态库,我导出了.a文件和xib文件。我使用它的示例应用程序在其包中包含xib(构建阶段的“复制包资源”)在我的库代码中,我在一个单独的UIViewContoller子类中有一个函数,用于从Nib创建ViewController:-(void)presentCustomController{self.vCtrl=[[CustomControlleralloc]initWithNibNa

ios - "Attempt to set a non-property list object...."带有自定义类的 NSMutableDictionary

这个问题在这里已经有了答案:Writecustomobjectto.plistinCocoa(3个答案)关闭8年前。我有一个名为ServerModule的自定义类,它是NSObject的子类。我基本上将所有这些ServerModule和键值对存储在NSMutableDictionary中。然后字典存储在NSUserDefaults中。我了解到NSUserDefaults仅在访问对象时返回对象的不可变版本,因此我将字典初始化更改为:_AllModules=[[NSMutableDictionaryalloc]initWithDictionary:[_editServerModulesob

html - ionic 3 : How to Set Background to Transparent in IOS with QR Scanner Plugin?

我正在使用IonicNative插件QRSCANNER,但IOS中的应用程序未显示预览。做了很多研究,但没有解决方案。我已经设置了background-color:transparent!important几乎所有内容,包括:html,body,ion-app,ion-content,ion-page,.nav-decor,content-md,content-ios,ion-app.ios,.fixed-content,.scroll-content{background-color:transparent!important;}但IOS中的应用程序仍然显示白屏而不是预览,并且QR扫

iOS : Core Data: How to retain an ordered set of objects in a managed object

我的iOS应用程序中有一个NSManagedObject。该对象称为Round。在Round中,我与一堆Person对象有一对多关系。xCode使用NSSet作为我与Person托管对象的一对多关系的数据类型生成我的托管对象类。所以我的Round托管对象看起来像这样:@interfaceRound:NSManagedObject{}@property(nonatomic,retain)NSSet*people;@end但是NSSet不是一个有序的集合,我想保留我用来保存这些Person对象的NSArray的顺序,因为我将它分配给我的Round托管对象。我尝试将我的NSArray转换为N

ios - 单点触控 : CurrentCulture when "Language" set

在iPhone上,当用户将他们的语言设置为法语并将他们的区域格式设置为美国时,CurrentCulture代表en-US。只有当用户将他们的区域格式设置为法国时,我才会得到fr-FR;如果用户设置了他们的语言,但没有设置他们的区域格式,我如何确定语言? 最佳答案 你想查看NSLocale,例如NSLocale.CurrentLocale.Identifier获取类似en-US的字符串。这将为您提供iOS正在使用的准确值。.NET和iOS都有类似但又略有不同的API来获取这些值。仅使用iOS数据很难与.NET完全兼容(这不是一个完美的

Kotlin : Public get private set var

在kotlin中定义具有公共(public)getter和私有(private)(只能在内部修改)setter的var的正确方法是什么? 最佳答案 varsetterVisibility:String="abc"//Initializerrequired,notanullabletypeprivateset//thesetterisprivateandhasthedefaultimplementation见:PropertiesGetterandSetter 关于Kotlin:Publi

Kotlin : Public get private set var

在kotlin中定义具有公共(public)getter和私有(private)(只能在内部修改)setter的var的正确方法是什么? 最佳答案 varsetterVisibility:String="abc"//Initializerrequired,notanullabletypeprivateset//thesetterisprivateandhasthedefaultimplementation见:PropertiesGetterandSetter 关于Kotlin:Publi

ios - dispatch_set_target_queue 是如何工作的?

由于dispatch_set_target_queue资料不足,特来求助,万分感谢!这是我的测试代码:dispatch_queue_tmySerialDispatchQueue1=dispatch_queue_create("come.itenyh",NULL);dispatch_queue_tmySerialDispatchQueue2=dispatch_queue_create("come.itenyh1",NULL);dispatch_set_target_queue(mySerialDispatchQueue1,mySerialDispatchQueue2);dispatch_

objective-c - 空气打印 : Set default printer in UIPrintInteractionController

我需要一种方法,使用已知的printerId强制将选定的打印机呈现给UIPrintInteractionController。注意:为了进行测试,我使用安装在共享“打印机”的“MacBookPro”上的Printopia我做了这个测试:-(IBAction)print:(id)sender{UIPrintInteractionController*controller=[UIPrintInteractionControllersharedPrintController];UIPrintInteractionCompletionHandlercompletionHandler=^(UIP