iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Reading audio samples via AVAssetReader

How do you read audio samples via AVAssetReader? I’ve found examples of duplicating or mixing using AVAssetReader, but those loops are always controlled by the AVAssetWriter loop. Is it possible just to create an AVAssetReader and read through it, getting each sample and throwing the int32 of each audio sample into an array? Thanks.

Global Variables in Cocoa/Objective-C?

According to Cocoa Programming for Mac OS X, 3rd Edition, on page 202 (chapter 13): You will be registering, reading, and setting defaults in several classes in your application. To make sure that you always use the same name, you should declare those strings in a single file and then simply #import that file into […]

Pre-buffering for AVQueuePlayer

Does anyone know if AVQueuePlayer starts buffering the next AVPlayerItem when the current item is about to finish playing? I know there’s nothing in the docs to suggest this, I’m asking mostly if anyone has observed this kind of behavior or not.

How to add a UIView above the current UITableViewController

I have difficulty adding a subview (UIView) from within the viewDidLoad method of a UITableViewController This works: [self.view addSubview:self.progView]; But you can see the table cell lines bleed through the UIView progView. I’ve tried this approach: [self.view.superview insertSubview:self.progView aboveSubview:self.view]; Which is an attempt to add the progView, UIView to the superview, above the current view. […]

How to make a real private instance variable?

I want to make an instance variable that can’t be accessed from outside. Is something like that possible in objective-c? I remember Apple has private variables and stuff like that, but if people know about them, they can use them. Apple calls that “private API”, but obviously others can access that stuff if they find […]

iPhone Store Kit “Cannot connect to iTunes Store”

I am working on adding In-App purchases to my app. I am able to receive the productsRequest:didReceiveResponse method, and receive the array of products. My problem arises when I add a SKPayment to the SKPaymentQueue. After I add the product to the queue, in the paymentQueue:updatedTransactions method the transactions always have the state SKPaymentTransactionStateFailed. I […]

Encode NSString for XML/HTML

Is there a way to HTML encode a string (NSString) in objective-c, something along the lines of Server.HtmlEncode in .NET? Thanks!

Best way to save data on the iPhone

I am writing an iPhone application, and need to save the state of my application (5K or so). My main worry is data persisting across upgrades. Some of the applications I use clearly got this wrong, and I would prefer not to!

Informal Protocol In objective-C?

I was wondering if someone can explain what is informal protocols in Objective C? I try to understand it on apple documentation and some other books but my head is still spinning so i will really appreciate that if someone can explain with example. Thanks.

HTML Content fit in UIWebview without zooming out

I am making use of the UIWebView to render some HTML. However, although the width of my webview is 320 my HTML is still shown full width and can be scrolled horizontally. I want to achieve the same thing the native mail application achieves which is it fits all content within that width without zooming […]