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

How to use Facebook iOS SDK on iOS 10

I am trying to use Xcode 8 to build a app with Facebook login using Swift 3. When I switch back iOS Simulator 9.3, it works. In iOS 10, I receive this error: “”fbauth2:/” The operation couldn’t be completed. (OSStatus error -10814.)” and Optional(Error Domain=com.facebook.sdk.login Code=308 “(null)”) Anyone have solution for this? Note 1 : […]

How to detect orientation change?

I am using Swift and I want to be able to load a UIViewController when I rotate to landscape, can anyone point me in the right direction? I Can’t find anything online and a little bit confused by the documentation.

How to get information about free memory and running processes in an App Store approved app? (Yes, there is one!)

There is an app called “Activity Monitor Touch” in the App Store, which displays background processes as well as free memory. So there MUST be an public API to access this information. The evidence: I’m already searching for days but can’t find any good starting point. How can this app figure all this stuff out […]

How can I add NSAppTransportSecurity to my info.plist file?

https://developer.apple.com/videos/wwdc/2015/?id=711 @5:55 I can’t seem to be able to add this to my info.plist. There is no value it. I’m running XCode Version 7.0 beta (7A121l), and testing on iOS9. Because I can’t specifically declare what URL’s I want as seen in the video, I keep getting “App Transport Security has blocked a cleartext HTTP […]

How to write text on image in Objective-C (iOS)?

I want to make an image like this programmatically: I have the upper image and text with me. Should I write text on image? I want to make it a complete png image(image + label) and set it as the background of the button. Please provide any sample code or any suggestion for it.

Communicating and persisting data between apps with App Groups

iOS 8 revealed a new API yesterday concerning App Groups. It was kind of messy before to share data and communicate between apps and I believe that’s precisely what App Groups is intended to correct. In my app I have enabled App Groups and added a new group but I just can’t find any documentation […]

Request failed: unacceptable content-type: text/html using AFNetworking 2.0

I’m trying out the new version 2.0 of AFNetworking and I’m getting the error above. Any idea why this is happening? Here’s my code: NSURL *URL = [NSURL URLWithString:kJSONlink]; NSURLRequest *request = [NSURLRequest requestWithURL:URL]; AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; op.responseSerializer = [AFJSONResponseSerializer serializer]; [op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@”JSON: %@”, responseObject); } failure:^(AFHTTPRequestOperation […]

How to sort an NSMutableArray with custom objects in it?

What I want to do seems pretty simple, but I can’t find any answers on the web. I have an NSMutableArray of objects, let’s say they are ‘Person’ objects. I want to sort the NSMutableArray by Person.birthDate which is an NSDate. I think it has something to do with this method: NSArray *sortedArray = [drinkDetails […]

Evenly space multiple views within a container view

Auto Layout is making my life difficult. In theory, it was going to be really useful when I switched, but I seem to fight it all of the time. I’ve made a demo project to try to find help. Does anyone know how to make the spaces between views increase or decrease evenly whenever the […]

Ineligible Devices section appeared in Xcode 6.x.x

After installing Xcode 6 my devices moved to greyed-out section Ineligible Devices and I can’t select them as deploy target: Update: This error occurs in all versions of Xcode 6.x.x. There are so many different reasons causing this problem Check this solution list for more details.