xcode6

JavaScript not passing arguments το WindowScriptObject?

旧街凉风 提交于 2019-12-08 08:59:21
问题 First off, let me tell you that I've used webviews in Cocoa like 100 times. However, I have no clue as to what goes wrong... Here's the JS part: window.objc.log_("Selected Element!"); And here's the Objective-C part: - (void)log:(NSString*)msg { NSLog(@"JS: %@",msg); } And here's the output: JS: (null) What's going on? P.S. The WebView's windowScriptObject has been correctly set and isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript: have been defined. (The function wouldn't be

Auto Layout: Square Image View with equal width / height

亡梦爱人 提交于 2019-12-08 08:45:02
问题 The title might seem a bit complicated so I'll just show you what I want in some pictures. So here is what I want: [1] - http://i.stack.imgur.com/5Vckr.png And here is how I tried to accomplish it in xCode 6: [2] - http://i.stack.imgur.com/ags9s.png [3] - http://i.stack.imgur.com/UhIuy.png As you can see I tried to use size classes to snap the ImageView to the left and right in portrait view and to the bottom and top in landscape. But somehow it is not aligned right in Landscape and if I look

XCode hangs every time when i write few lines of code in playground

纵饮孤独 提交于 2019-12-08 08:12:54
问题 I have just started working with Swish after buying my new imac and i am working on play ground. for last 2 days i am banging my head with wall but i could not fix this problem. When ever i am writing few lines of code, Xcode hangs and mouse turns into small colored circle when you hoverover on the xcode window. I have to quit by force every time when xcode hangs. I tried all possible option which i could find on stackoverflow; I draged xcode from application to trash bin, cleaned trash bin,

iOS Swift: Using AWS SDK with xCode6 - error message

不羁岁月 提交于 2019-12-08 06:45:18
问题 Using CocoaPods have added the AWS libraries to my project. Created a BridgingHeader.h file: #import "AWSCore.h" #import "AWSCognito.h" #import "AWSS3.h" In application Build Settings > Objective-C Bridging Headers included this BridgingHeader.h file. Now in my code when i use the credentials initialisation code: let credentialsProvider = AWSCognitoCredentialsProvider.credentialsWithRegionType( AWSRegionType.USEast1, accountId: "999999999999", identityPoolId: "us-east-1:ac328da6-63f3-4748

Moving between GameScene and ViewController Swift

大憨熊 提交于 2019-12-08 05:39:18
问题 I want to move from my GameScene to ViewController, when I touch an Image and back to GameScene when I touch an UIButton. It worked from ViewController to GameScene, because it is UIButton. I have done it like this: @IBAction func playbut(sender: UIButton) { var scene = GameScene(size: CGSize()) let skView = self.view as! SKView! skView.ignoresSiblingOrder = true scene.scaleMode = .ResizeFill scene.size = skView.bounds.size skView.presentScene(scene) } But I don't know what code to write to

Update iOS SDK version to 8.4

為{幸葍}努か 提交于 2019-12-08 05:11:36
问题 I had a version of the Xcode I believe It was 6.1 with iOS SDK version 8.3. Apple store showed that an Xcode update is available with SDK 8.4. I updated Xcode and the new update version was 6.3.2. I have a iPad with iOS 8.4 on it. so to run the app on it, I tried to set the Base SDK to 8.4. but, surprisingly It doesn't exists! I can only choose 8.3 with "Latest iOS" written beside it. What can I do? And why the update said that the SDK version that is available is 8.4 since it didn't exists?!

swift - touchID takes long time to load

廉价感情. 提交于 2019-12-08 04:14:12
问题 I'm working on integrating touchID into my application. The process was fairly simple, but even just using my dummy data, it takes about 5 seconds after it authenticated my fingerprint, before it performs it's task. Here's my code: func requestFingerprintAuthentication() { let context = LAContext() var authError: NSError? let authenticationReason: String = "Login" if context.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &authError) { context.evaluatePolicy

How to embed a storyboard view controller in an NSScrollView OS X (10.10) to make a complex inspector view?

老子叫甜甜 提交于 2019-12-08 03:30:04
问题 I'm looking at WWDC 2014 video, "212: Storyboards and controllers on OS X". In this video they claim that Pages UI does/could be arranged using Storyboards on OS X (see below). However, in Pages UI the inspector view is very long and is embedded in a scroll view (you can verify this my two-finger scrolling in Page.app inspector view), also some inspector items are themselves contained in (some type of custom) disclosure view. It doesn't seem to be possible to embed a storyboard view

UIActionSheet bad access, UIPresentationController zombie

删除回忆录丶 提交于 2019-12-08 03:12:20
问题 Testing an app in iOS 8, ActionSheet keeps crashing with bad access. (Xcode 6 beta 2, iOS 8 simulator) There is a related post here: UIActionSheet crash in iOS8beta Instruments do catch a zombie related to UIPresentationController . I'm not sure I'm reading it correctly, but it seems that retain count drops from 6 to -1. Here's the full log: Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller 0 Malloc +1 1 00:14.487.023 UIKit UINibDecoderDecodeObjectForValue 1 Retain +1

AVSpeechSynthesizer iOS 8 Issues

≯℡__Kan透↙ 提交于 2019-12-08 02:34:34
问题 Since upgrading to xCode 6 and iOS 8 I've noticed serious issues with AVSpeechSynthesizer. Prior to the upgrade, it worked perfectly, but now, several issues have risen. Speech Utterances are playing at a much faster rate then how they were prior to upgrade. When I queue up 2 speech utterances, it simply skips over the first utterance and plays the second one first. (This only occurs on the first run of the speech synthesizer. The second run and on works properly.) Please, any help would be