I want to do a files selector like this : http://i.stack.imgur.com/nxYQT.png for my programm but I don't know how to do this...
Can you please help me ? I'm using Xcode 5 on Mac OS X 10.8.5
That is called an NSOpenPanel. Here's the documentation: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Classes/NSOpenPanel_Class/Reference/Reference.html
Related
I have been working with Apple Watch OS 2 for a while, but have not succeeded in triggering vibration on Apple Watch standalone app in Swift, using Xcode Version 7.0 beta 6 (7A192o).
All tutorials using vibration on iPhone in Swift look like:
import AudioToolbox
...
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
But I cannot import the AudioToolbox library.
I get the error:
Could not build Objective-C module "AudioToolbox"
Has anyone already found the way to do it?
You can generate haptic & auditory feedback, using:
WKInterfaceDevice.currentDevice().playHaptic(.Click)
'Click' is one of the 'cases' (types of vibration/beeps) that you can choose, cfr:
enum WKHapticType : Int {
case Notification
case DirectionUp
case DirectionDown
case Success
case Failure
case Retry
case Start
case Stop
case Click
}
This only works on the device, not in the simulator.
In Swift 3:
WKInterfaceDevice.current().play(.success)
I'm not a expert in WatchKit but I know that with Watch OS 2 you can use:
WKInterfaceDevice().playHaptic(.Notification)
The function playHaptic called on a WKInterfaceDevice instance engage the haptic engine in Apple Watch.
See more in the Apple documentation.
The Correct format is
WKInterfaceDevice.currentDevice().playHaptic(.Notification)
You can easily play the notification sound on watch
Function :
WKInterfaceDevice().playHaptic(.Notification)
Here you have :
Documentation
WKInterfaceDevice.current().play(.failure)
in Swift 3
I am trying to inject my code for overlayicons in finder in all the three views,
but not able to do it for mac os 10.9 and above, kindly help me in this
for 10.8 and below versions i am able to do.
Maybe try the new Finder Sync? https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Finder.html
I have been trying to use the AVCaptureScreenInput class on Mountain Lion 10.8:
https://developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVCaptureScreenInput_Class/Reference/Reference.html
I downloaded the following sample code provided by Apple:
http://developer.apple.com/library/mac/#samplecode/AVScreenShack/Introduction/Intro.html
But when I ran it, it did not capture my screen. Instead it just showed a green screen where my screen was supposed to be.
Someone else noticed the problem here: http://openradar.appspot.com/12220970
Does anyone know how to work around this problem?
Doing the following "fixed" the problem. I don't know why:
defaults write com.apple.cmio CMIO_Unit_Input_ASC.DoNotUseOpenCL -bool YES
I filed a bug here: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/41/wo/Dtr5y1Zj8ikA0Rjw6xYON0/6.83.28.0.9
Bug ID = 13917881
"High" session preset doesn't work in Mac OS 10.8. But on changing to
other preset like medium or any other resolution sample code will work.
I'm just working on Mac OS X Lion, and totally fresh facing with the IntelliJ IDEA. Is there any easy way to create a class just with the keyboard, without the help of the mouse?
The way I do it is
Navigate to the correct Java source directory in the Navigator. I do that by opening a class already in the module (⌘-O), then use Select Target, Project View (option-F1, 1) to jump to the right place in the Navigator.
Then the Generate Code command, both ⌘-N (Command-N) and control-option-N in the Mac OS X 10.5+ keymap, will open the New pop up where you can type J, A... to get Java
I've probably done this to myself somehow, but in XCode 3.2.5, I can create both iOS and Mac OS X projects, but I only have documentation for iOS. When I click on that little "Home" dropdown, iOS is the only option.
I used to have more options for documentation.
So how do I get the Mac OS X docs? Do I have to re-install xcode or something?
Open the XCode preferences, and go to the «Documentation» tab.
From there, you can re-install (download) the documentation sets.
Documentation for Snow Leopard is:
http://developer.apple.com/rss/com.apple.adc.documentation.AppleSnowLeopard.atom
Google for more atom feeds.. : )