属性'self。*'没有在super.init调用中初始化

我只是更新我的xcode到6.3.1。 问题是我得到这个奇怪的错误信息,因为迅速1.2。 我得到了这种错误信息 /Users/MNurdin/Documents/iOS/xxxxx/Library/SideBar.swift:32:15: Property 'self.originView' not initialized at super.init call /Users/MNurdin/Documents/iOS/xxxxx/Library/SideBar.swift:38:20: Immutable value 'self.originView' may only be initialized once 在这个代码上 let originView:UIView? override init() { super.init() //error here } init(sourceView:UIView, menuItems:Array<String>){ super.init() //error here originView = sourceView //error here 请指教。 谢谢。

UITableViewCellAccessoryCheckmark和AutoLayout约束

我有自定义的UITableViewCell和pipe理我的单元格的select。 选中单元格并显示复选标记时,单元格Content View宽度会缩小,带有后续约束的标签将移动到左侧。 如何有效避免内容移动? 我不想将约束设置为领先,因为我有灵活的tableview宽度,他们是正确的alignment。 当我想通过IBOutlets更新代码中的代码约束时,我遇到了麻烦,因为我在cellForRow:返回了UITableViewCell多个子类cellForRow:并且在didSelectRowAtIndexPath:遇到了无法识别的select器错误didSelectRowAtIndexPath:尝试在代码中设置约束时。 任何优雅的解决 谢谢。

在iOS4 +中显式禁用UIViewanimation

我一直在阅读,苹果build议使用基于块的animation,而不是CATransaction 之前,我正在使用此代码来禁用animation: [CATransaction begin]; [CATransaction setDisableActions: YES]; // !!! resize [CATransaction commit]; 有没有新的推荐方法来做到这一点,或者这还可以吗?

错误:“expression式的types不明确,没有更多的上下文”

我很新的编码Swift,所以请原谅,如果这个错误是一个简单的答案! 我不断收到一条错误消息,指出“expression式的types不明确,没有更多的上下文”。 var findTimelineData: PFQuery = PFQuery(className: "Sweets") findTimelineData.findObjectsInBackgroundWithBlock { (objects:[AnyObject]?, error:NSError?) -> Void in if error == nil { for object:PFObject in objects! { // —-This is the error line— self.timelineData.addObject(object) } } } 我明白问题是什么,我只是不确定如何解决问题。 我已经看到了有关这个答案的其他问题,但没有关于通过一个AnyObject的数组迭代。 谢谢!

APPNAME没有iphone6 +可以执行的架构

我现在正在开发一个新的应用程序。 我只在模拟器中testing过,直到今天。 模拟器中的一切都很好。 但是,当我尝试运行我的iPhone(8.1.2)的应用程序,我得到这个错误: APPNAME没有iphone6 +可以执行的架构 我的目标设定是(Xcode 6.1.1): 架构= $(ARCHS_STANDARD) VALID_ARCHS = arm64 armv7s armv7 另一个类似设置的应用程序在同一个iPhone上运行良好… 我已经尝试了很多谷歌search的东西,但没有什么帮助。 这里有人有这个问题吗? 谢谢,Urkman

条形码扫描器设备通过蓝牙连接到IOS时,默认键盘不会进入

当条形码扫描器设备使用蓝牙连接时,我正面临键盘问题。 stream: 1)我已打开蓝牙,并通过input显示的代码连接使用蓝牙连接条码扫描器设备。 2)我能够使用扫描仪,但默认的键盘不显示,即使我们调用becomeFirstResponder。 3)当我断开扫描仪设备或closures蓝牙连接,然后键盘即将到来。 注意 :以下是我使用的条形码扫描仪设备的链接 条码扫描仪设备信息 任何人都面临这样的问题? 请build议如何解决这个问题。 提前致谢..!

如何更改Swift中多个组件的UIPickerView的文本颜色?

以下代码将更改所有3个组件的选取器视图的字体颜色。 但是,当我试图旋转轮子时,它会崩溃。 我认为这与didSelectRow函数有关。 也许这两个函数必须以某种方式嵌套? 任何想法? func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? { var attributedString: NSAttributedString! if component == 0 { attributedString = NSAttributedString(string: a.text!, attributes: [NSForegroundColorAttributeName : UIColor.redColor()]) } if component == 1 { attributedString = NSAttributedString(string: b.text!, attributes: [NSForegroundColorAttributeName : UIColor.redColor()]) } if component == 2 { attributedString = […]

苹果Mach-O-Linker错误CocoaPods

所以我一直在试图让我的应用程序运行起来。 从我可以告诉应用程序丢失Cocoapods作为依赖。 所以。 我安装并添加了Cocoapods。 但是,无论出于何种原因,我仍然遇到同样的错误。 我是一个没有经验的开发者,试图自学我必须补充。 Ld /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator/Umbrella.app/Umbrella normal i386 cd“/ Users / bfarag / Desktop / The Nerdery / BRAVO.iOS.CodeChallenge “export IPHONEOS_DEPLOYMENT_TARGET = 7.0 export PATH =”/ Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 […]

更改UITableView行高而不closures键盘

我有一个UITableViewCell里面的TextView。 TextView中的文本可以在那里编辑。 TextView垂直增长和缩小,取决于文本包含的行数。 到目前为止,我还没有find一个可能让包含TextView的行dynamic增长和缩小。 [tableView reloadData]; 要么 [tableView reloadRowsAtIndexPaths: withRowAnimation:]; 不工作,因为他们每次改变都会closures键盘。 有没有办法改变UITableView中的单个行的高度而不closures键盘?

所需的背景模式密钥不在info-plist文件中

我想设置所需的背景模式键值,以便我的应用程序也在后台工作。 其实我想获得用户位置更新,当应用程序在后台,但没有在我的信息plist文件中调用所需的背景模式键的关键。 如何设置这个键,并把它放在我的文件中?