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

Shift elements in array by index

Given array of n elements, i.e. var array = [1, 2, 3, 4, 5] I can write an extension to the Array so I can modify array to achieve this output: [2, 3, 4, 5, 1]: mutating func shiftRight() { append(removeFirst()) } Is there a way to implement such a function that would shift array […]

How to switch to different Storyboard for iPhone 5?

Just as an app utilizes different storyboards for iPad and iPhone, I would like my app to use a different storyboard for the iPhone 5. Since there is no option in the Info.plist to select default storyboard for iPhone 5, how would I programmatically call the storyboard? I do not want to use AutoLayout for […]

Xcode 6 – How to pick signing certificate/provisioning profile for Ad-Hoc distribution?

To distribute the app to our testers we use Xcode, which we do using the following process: Archive application Distribute for Ad-Hoc Choose provisioning profile Save the .ipa to a folder But with Xcode 6, this workflow was changed a bit. I can still select the Ad-Hoc distribution option, but I cannot select the provisioning […]

phonegap: cookie based authentication (PHP) not working

I’m working on a mobile web-app using sencha touch, HTML5 and phonegap as a wrapper. I’m using PHP-Authentication (Cookie) and ajax-requests. Everything works fine on safari or chrome, but after the deployment with phonegap (webview) it does’t work anymore… Any help would be appreciated 🙂 Some more details: All data for my app is loaded […]

Delete all keys from a NSUserDefaults dictionary iOs

I use the NSUserDefaults dictionary to store basic information such as high scores etc so that when the user closes the app data is not lost. Anyways I use: NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; to store data. If I wish to store a new high score for example then I would do: [prefs setInteger:1023 forKey:@”highScore”]; […]

Deleting all the files in the iPhone sandbox (documents folder)?

Is there an easy way to delete all the files(images) I saved in the documents folder of the app?

Correct way to save/serialize custom objects in iOS

I have a custom object, a UIImageView subclass which has a few gestureRecognizer objects. If I have a number of these objects stored in a NSMutableArray, how would this array of objects be saved to disk so that it can be loaded when the user runs the app again? I would like to load the […]

real time plotting on iPhone using core plot?

I want to use core-plot for drawing line graph dynamically. data won’t come at a time, we will be receiving point by point dynamically. Is it possible to draw the chart dynamically using core-plot i.e drawing point by point as on when we receive the (x,y) point? Please help me, Thanks.

What is the Life Cycle of an iPhone application?

Can anyone explain what is the life cycle process of iPhone? i.e from the start to end of the application life cycle.

Creating a UIImage from a UIColor to use as a background image for UIButton

This question already has an answer here: How to create a colored 1×1 UIImage on the iPhone dynamically? 4 answers