osx-yosemite

Can't drag and drop item from storyboard to viewcontroller in xcode

时光总嘲笑我的痴心妄想 提交于 2019-12-03 00:01:44
I started working with xcode a few days ago, and today I tried to connect a textview from the main storyboard to the viewcontroller, but I figured out that its not working. I am able to ctrl+click to drag the item, but unable to place it in both viewcontroller.h and .m. I double checked that its viewcontroller and not UIViewcontroller, so this is not the case. I'm using a Yosemite 10.10 mac. Any kind of help would be appreciated. Select the ViewController in storyboard and change the name of the ViewController to the name in the .h or .m file and then try ctrl+click and drag For beginners -- >

What is the quickest way to toggle hide/show hidden files on a Mac OS X Yosemite?

痞子三分冷 提交于 2019-12-02 23:57:19
I'm on Yosemite, and I want to toggle hide/show all the hidden files on a Mac. Every-time, I want to do that I have to go to Terminal.app and run these command : To show defaults write com.apple.finder AppleShowAllFiles TRUE To hide defaults write com.apple.finder AppleShowAllFiles FALSE I'm wondering if there is a better tweak out there that accomplish this in just a click of a button. I prefer using this shortcut: ⌘ CMD + ⇧ SHIFT + . Update, considering all comments: try set state to (do shell script "defaults read com.apple.finder AppleShowAllFiles") as boolean on error set state to false

how to handle applicationShouldHandleReopen in a Non-Document based Storyboard Application

不羁岁月 提交于 2019-12-02 22:31:42
The best I have been able to figure out is: func applicationShouldHandleReopen(sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool { if !flag{ let sb = NSStoryboard(name: "Main", bundle: nil) let controller = sb?.instantiateInitialController() as NSWindowController controller.window?.makeKeyAndOrderFront(self) self.window = controller.window } return true } But that requires that I set a ref to the window on my app delegate. Since that isn't required when the app initially starts I'm pretty positive I am doing something wrong while missing something obvious. This solution also appears

Include search path on Mac OS X Yosemite 10.10.1

本秂侑毒 提交于 2019-12-02 21:06:57
I just to change the include search path order (I believe). I'd like to change the include search path. Especially, I need /usr/local/include first. But it doesn't change because of duplicate. How can I change it? I suppose there's default setting, because paths I don't specify appears. Like /usr/include/c++/4.2.1 , /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free

Node script executable not working on Mac : env: node\\r: No such file or directory

巧了我就是萌 提交于 2019-12-02 20:45:33
I have created my node script executable to execute some tasks grunt. On Windows, my node script works fine. But on Mac OS X (Yosemite), it's not working. My node script has been published on Windows. My node script is installed via npm command : npm install -g task-app My node script have this first line : #! /usr/bin/env node I tried many some solutions to solve my problem but I'm still stuck. Here's these solutions that I used : uninstall and reinstall Node.js execute this command to create a link for node : sudo ln -s /usr/bin/nodejs /usr/local/bin/node set my path with this command :

youtube-dl DASH video and audio in highest quality without human intervention

牧云@^-^@ 提交于 2019-12-02 20:37:23
With youtube-dl I first look what video quality is available and then in second step I download highest possible quality (in this example -f 137+140 ). Youtube-dl will automatically merge audio and video stream (DASH format) How to automate that with shell script? Too choose with every video highest audio and video quality? > youtube-dl -F 'https://www.youtube.com/watch?v=VAdRBLyjLRQ&feature=youtu.be&t=8m14s' [youtube] Downloading login page [youtube] Logging in [youtube] VAdRBLyjLRQ: Downloading webpage [youtube] VAdRBLyjLRQ: Downloading video info webpage [youtube] VAdRBLyjLRQ: Extracting

Swift - Write Image from URL to Local File

邮差的信 提交于 2019-12-02 20:17:38
I've been learning swift rather quickly, and I'm trying to develop an OS X application that downloads images. I've been able to parse the JSON I'm looking for into an array of URLs as follows: func didReceiveAPIResults(results: NSArray) { println(results) for link in results { let stringLink = link as String //Check to make sure that the string is actually pointing to a file if stringLink.lowercaseString.rangeOfString(".jpg") != nil {2 //Convert string to url var imgURL: NSURL = NSURL(string: stringLink)! //Download an NSData representation of the image from URL var request: NSURLRequest =

Unable to open a connection to an FTDI device

隐身守侯 提交于 2019-12-02 17:54:11
问题 I'm working on a small OS X app that connects to an FTDI device. I've configured my project according to the answer in this question (I've added the .dylib file as a framework, and I added the ftd2xx.h, WinTypes.h, and ftd2xx.cfg files to my project). I'm currently able to detect if/when the FTDI device is connected over USB: DWORD deviceCount = 0; FT_STATUS ftdiPortStatus = FT_ListDevices(&deviceCount, NULL, FT_LIST_NUMBER_ONLY) if (ftdiPortStatus == FT_OK) { // The debugger tells me the

Safari Web inspector keeps disconnecting

时光怂恿深爱的人放手 提交于 2019-12-02 17:15:43
I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3) , the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again. There are a few things to try: 1. Test on the Xcode Simulator: Open the iPhone simulator in Xcode and debug there with Safari Web Inspector. Sidenote : Maybe you need to download the Safari Technology Preview 2. Reset your location and privacy settings on your device. Settings >

Genymotion Error: “Unable to load VirtualBox Engine” on Yosemite. VirtualBox installed

徘徊边缘 提交于 2019-12-02 17:08:51
I have a Macbook Pro 13 inch with OS X Yosemite [Memory 8 GB, Graphics Intel Iris Graphics 6100 1536 MB]. I am trying to setup Genymotion as Android Emulator. I installed Oracle VirtualBox first from https://www.virtualbox.org/wiki/Downloads [VirtualBox-5.0.0-101573-OSX.dmg], and then Genymotion for personal use from Genymotion [genymotion-2.5.0.dmg]. But I get the following error - I checked all the previous answers on StackOverflow and the Google search results, and I did the following, but none of them solved the problem. 1. (a) sudo /Library/Startupitems/VirtualBox/VirtualBox restart OR (b