草庐IT

TYPE_SCROLL_SENSITIVE

全部标签

swift - 'init 不可用 : use 'withMemoryRebound(to:capacity:_)' to temporarily view memory as another layout-compatible type

由于我将我的代码转换为Swift3,所以发生了错误。'initisunavailable:use'withMemoryRebound(to:capacity:_)'totemporarilyviewmemoryasanotherlayout-compatibletype.这是我的代码:funcparseHRMData(data:NSData!){varflags:UInt8varcount:Int=1varzw=[UInt8](count:2,repeatedValue:0)flags=bytes[0]/*----------------FLAGS----------------*//

ios - swift 2 : Type of expression is ambiguous without more context

classExample:NSObject,UIViewControllerAnimatedTransitioning,UIViewControllerTransitioningDelegate{varaView:UIView!UIView.animateWithDuration(duration,delay:0.0,usingSpringWithDamping:0.8,initialSpringVelocity:0.8,options:nil,animations:{self.aView.transform=CGAffineTransformIdentity//Thislineist

xcode - Swift 编译器错误 : Use of undeclared type 'EKEventStore'

在swift中,我定义了一个类FirstViewController:UIViewController。在文件的开头,我有这个导入:importUIKitimportEventKit在类的方法中,我有这一行:vareventStore:EKEventStore=EKEventStore()我已经导入了EventKit.framework。但我总是遇到这个Swift编译器错误:使用未声明的类型“EKEventStore”。请帮忙! 最佳答案 在DeploymentTarget=8.0的情况下,我必须导入EventKitUI.frame

ios - “type of expression is ambiguous without more context” 使用结构属性作为字典键

我得到异常:typeofexpressionisambiguouswithoutmorecontext使用以下代码:structParameter{staticletEmail="email"staticletPassword="password"staticletIsFacebookUser="isFacebookUser"}letparameters:[String:AnyObject]=[Parameter.Email:email,Parameter.Password:password,Parameter.IsFacebookUser:false]它不接受bool类型,我不想更改

ios - Firebase 给了我 Use of undeclared type with FIRDatabase and FIRDataSnapshot

从零到应用程序的FirebaseIO示例给我无法定义的错误//Firebaseservicesvardatabase:FIRDatabase!继续//CreateachatmessagefromaFIRDataSnapshotfuncchatMessageFromSnapshot(snapshot:FIRDataSnapshot)->ChatMessage?{letdata=snapshot.valueas!Dictionaryguardletname=data["name"]asString!else{returnnil}guardletmessage=data["message"]

ios - com.apple.product-type.bundle.ui-testing,但是 'iphonesimulator' 平台没有这样的产品类型

我使用Xcode7Beta开发这个项目现在我切换到Xcode6.4所以我现在遇到了这个问题我试过clean,但是没用目标指定产品类型'com.apple.product-type.bundle.ui-testing',但'iphonesimulator'平台没有这样的产品类型 最佳答案 如果您不使用UI测试,您可以在项目的build设置中删除UITest目标。 关于ios-com.apple.product-type.bundle.ui-testing,但是'iphonesimulato

ios - 错误 : Value of type 'String' has no member 'URLByAppendingPathComponent'

我的错误是:“String”类型的值没有成员“URLByAppendingPathComponent”我在这一行中遇到了错误:letsavePath=documentDirectory.URLByAppendingPathComponent("mergeVideo-\(date).mov")我的完整代码://4-GetpathletdocumentDirectory=NSSearchPathForDirectoriesInDomains(.DocumentDirectory,.UserDomainMask,true)[0]vardateFormatter=NSDateFormatter

ios - Realm iOS : Cannot Convert value of type 'Dogs.Type' to expected argument type 'T.Type'

这是我的DBManager.swiftimportRealmSwiftclassDBManager{classfuncgetAllDogs()->[Dog]{letrealm=try!Realm()//COMPILERERROR:CannotConvertvalueoftype'Dogs.Type'toexpectedargumenttype'T.Type'returnrealm.objects(Dog.self)}}这是我的Dog.swift:importFoundationimportRealmSwiftclassDog:Object{dynamicvarfirstName=""d

ios - 自定义 UITableViewCell : Value of type 'UITableViewCell' has no member 'pointsNumber'

我的错误在下面的第一个代码中,在开关的情况2中。cell.pointsNumber.text="toto"Xcodeerror:Valueoftype'UITableViewCell'hasnomember'pointsNumber'我无法访问我的类PerformancesViewCell来填充标签。我的转换不起作用,我的单元格仍然像UITableViewCell而不是PerformancesViewCell。预先感谢您的帮助;)细胞标识符:letthirdCellIdentifier="thirdCell"表格View:functableView(tableView:UITableV

ios - Swift:利用 CLLocationManagerDelegate 和 CoreLocation.framework 导致 "Use of undeclared type"错误

我正在播放一个youtube视频,该视频提供了一个基本示例,说明如何利用Xcode的定位服务为程序编写一种map用户界面。我按照设置程序的视频中的步骤进行操作,并在尝试编译应用程序时收到一个假设简单的“使用未声明的类型”错误。https://www.youtube.com/watch?v=qrdIL44T6FQ-链接到youtube视频。问题出现在类创建行。importUIKitimportMapKitimportCoreLocationclassViewController:UIViewController,MKMapViewDelegate,CLLocationManagerDel