Tag Archives: ios

How can I autoplay media in iOS >= 4.2.1 Mobile Safari?

Questions: I cannot seem to get audio media to play in Mobile Safari on iOS 4.2.1 in any situation other than the handler of a click event performed by the user. Even then, if player.play() is called in any asynchronous fashion (ajax, setTimeout, etc) it doesn’t work. I’ve tried calling player.load() before player.play(). I’ve tried… Read More »

Multiple HTML5 media elements on one page in iOS (iPad)

Questions: My research has led me to learn that Apple’s media element handler is a singleton, meaning I can’t have a video playing while an audio is playing in the background. I’m tasked to build a slideshow presentation framework and the client wants a background audio track, timed audio voice-overs which match bullet points, and… Read More »

iOS UINavigationBar vs UIToolbar vs UITabBar

Questions: Let me know which one should be used in what case. What are differences among them? What are the advantage and disadvantage of each component? Answers: The UINavigationBar class implements a control for navigating hierarchical content. It’s a bar, typically displayed at the top of the screen, containing buttons for navigating up and down… Read More »

iOS 4 blocks and retain counts

Questions: I’m just getting started with blocks and Grand Central Dispatch. I’ve been told (and read in the Apple Documentation) that any object referenced from within a block gets retained. For instance: ^{ self.layer.transform = CATransform3DScale(CATransform3DMakeTranslation(0, 0, 0), 1, 1, 1); self.layer.opacity = 1; } “self” gets retained so it leaks. To avoid that, I… Read More »

how to determine when settings change on ios

Questions: I have created a custom settings using the standard root.plist approach for the iphone. I’m wondering if there’s a way to determine when the user changes those settings in my app… Answers: You can listen for NSUSerDefaultsDidChange-notifications with this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(defaultsChanged) name:NSUserDefaultsDidChangeNotification object:nil]; Whenever the NSUserDefaults changes, defaultsChanged will be called. Don’t… Read More »

How to Implement iOS8 Interactive Notification

Questions: I am developing an iOS8 application which supports interactive notification. But I don’t have clarity on the features supported by interactive notification and how to send/handle interactive notifications. If any one can give an example, that would be very much helpful for me. Thanks in Advance 🙂 Answers: First you need to create the… Read More »

iOS: Universal App – Release as iPhone only

Questions: A customer is interested in releasing a universal app. However, the first release will contain only the iPhone version, the second release will contain both versions. I found a few links where ppl figured out how to make this work in the simulation environment. However, i could not find claims about apps that finally… Read More »