I'm working with the iPhone 3.0 SDK (bit of a novice really), and I have set up an Interface Builder View with several UIButtons in it. I also have several sound files in the Xcode project.
I have searched for this and none of the solutions seem to work for me. Does anyone know how to make a short sound play once upon pressing a button?
Sorry about the simplistic question, but Apple's avTouch doesn't build on my Xcode.
Thanks
For the most basic needs, the AVAudioPlayer class will work. It has the simplest interface on the iPhone SDK and is best suited for what you're describing.
If you need lower latency or multiple sounds at once, then your choice is between OpenAL or Core Audio. See the oalTouch example for OpenAL use.
Related
I'm trying to work on a Markdown app for macOS and iOS that works more closely with Jekyll, especially in use with GitHub Pages. I have a general idea for an interface and I know a bit of Swift, but I am experiencing issues when trying to create the interface for the macOS version. I want to create an interface that best works with macOS Yosemite or higher, but the Interface Builder in Xcode doesn't seem to let me do that. For reference, I have a linked image of Bear, which has a similar design that I want to do:
Bear screenshot
While I am able to find parts in documentation and other parts of Stack Overflow regarding using the transparency programmatically, I am still unable to figure out how to get the master-detail view in the "Yosemite" style, as seen in the image. I've looked in Apple's documentation and other websites, and after some researching, I can't seem to find the right answer to this question.
How do I achieve this master-detail view, or just creating an app in Interface Builder that pertains to recent macOS versions' UI, not something from OS X Mountain Lion or below?
There is no pre-made "master-detail" view component in Interface Builder.
You have to use NSVisualEffectView together with NSTableView and programmatically exchange views in a container NSView.
Relevant API's:
https://developer.apple.com/reference/appkit/nsvisualeffectview
https://developer.apple.com/reference/appkit/nstableview
I am about to submit my app in iTunes connect.
Now it is asking me for screenshots for a 3.5-inch, 4-inch, 4.7-inch and 5.5-inch.
Since I coded it in swift I guess I can skip the 3.5inch part?
But my question is: I only have an 4-inch device available. How can I add the screenshots of the 4.7 and 6inch? maybe with the simulator?
Thank you
In the iOS Simulator File > Screenshot
That saves a screenshot to your desktop.
Simulator should be fine. You can edit it using Sketch, I found it really helpful.
I tried a few different methods, and what worked best for me in a short amount of time was to capture screenshots in the iOS Simulator at 100% scale and then resize them using GIMP, which is free unlike Sketch.
If you're in the business of creating screenshots for many devices, across locales or with frequent screenshot update needs it's best to look into automation with tool like Snapshot.
Is there any tutorial available for creating Universal UI which can run on iPad as well as iPhone on different resolution. I tried looking in the official documentation, but couldn't find anything about UI files.
I notice you've tagged this question with Marmalade, so I'm assuming you are talking about how to write a Universal app in Marmalade? If so then creating a Universal UI is pretty much up to you to implement in the best way you see fit.
By default all Marmalade apps are Universal apps, though you can limit to iPad only with the MKB setting iphone-ipad-only.
Marmalade does come with the iwui module that allows you to lay out user interfaces with buttons and text boxes etc. but ultimately unless you have a very simple UI you'll need to either provide different UI layouts for each screen resolution/orientation you wish to support, or do some fancy laying out in code.
Apple wisely chose to persuade developers into creating separate UIs for iPhone and iPad since the one-layout-fits-all approach generally looks bad at any screen size.
I would like an iPhone simulator for Windows. Something similar to this one here:
http://css-tricks.com/video-screencasts/38-basics-tips-on-designing-for-the-iphone/
Note, this is NOT to test iPhone Apps... but rather, to test websites. I know I could just use a browser, but I was hoping for something with a bit more functionality ( specific to the touch interface ) that I could test some web pages on.
I've seen the beta project here: http://labs.blackbaud.com/NetCommunity/article?artid=662
Is this the best option at the moment? The article was from last year, that's why I ask.
Just to add additional information to this post:
found another one for both iphone and ipad: http://code.google.com/p/ibbdemo2/downloads/detail?name=iBBDemo2.air&can=4&q=
Google Chrome now has the ability to "Toggle Device Mode" by clicking the Phone icon in Dev Tools. This gives you a more touch-specific interface than just using the browser, allows you to throttle data, etc...
From here, you can choose the device:
You can do it all online, without a simulator:
http://iphonetester.com/
Keep in mind, it's not a real test on an iPhone, but if you use it with Safari or Chrome for Windows, you'll come really close to how it'll look on an iPhone.
UPDATE: iphonetester.com no longer exists.
That's the best I found: http://iphone4simulator.com/
There is a commercial successor to iBBDemo2 that's available for $40 - http://www.electricplum.com/studio.aspx
I am trying to make a simple application which will store the sound said by user , say on click of record button and will play it back to him/her , say on click of play button.
Can anyone suggest me some appropriate way to do this ??
Thanks,
Miraaj
You can use QuickTime Kit's capture APIs to record a movie of the audio, and QTMovie (from the same framework) to convert it to a more conventional format for audio files and to play back both the intermediate file and the converted file.
There used to be a QuickTime Kit Programming Guide, but it didn't cover capturing and is now gone from developer.apple.com. You should file a bug against the docs.
This answer will work in a Cocoa (Mac) app. If you meant to ask about the iPhone, you should re-tag your question, as the solution will be completely different for a Cocoa app vs. a Cocoa Touch (iPhone) app.
I used direct sound to create an entire internet phone application a few years ago. Your question is far simpler, you won't have to deal with the circular buffer as critically. Direct sound is pretty main stream and you can find a lot of help with it in forums, and it's free!