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

Static properties in Swift

I’m trying to convert the following Objective-C code to Swift. In my Objective-C code, there’s a static variable and its accessed from a class method. @implementation SomeClass static NSMutableArray *_items; + (void)someMethod { [_items removeAll]; } @end Since you can’t access types declared like this private var items = [AnyObject]() from class functions in Swift, […]

Xcode 6 iPhone Simulator Application Support location

In Xcode 6, I have an app I’m using Core Data in, but there is no folder in Application Support for the iOS 8 iPhone Simulator. Where are my files and Core Data sqlite database being stored?

change app name in App Store

I have app called “X”. It’s already approved in the app store. Now I want it to be called “X Pro” for some reasons. What should I edit in plist or ITC to change this name? I guess I should change bundle_name or bundle_display_name, but will it change app name in the App Store or […]

afnetworking 3.0 Migration: how to POST with headers and HTTP Body

I am trying to make a POST request which has HTTPHeader Fields and a HTTP body to the youtube API. Previously in version 2.0 of AFNetworking, I used to do it this way which worked: NSDictionary *parameters = @{@”snippet”: @{@”textOriginal”:self.commentToPost.text,@”parentId”:self.commentReplyingTo.commentId}}; NSString *url = [NSString stringWithFormat:@””,[[LoginSingleton sharedInstance] getaccesstoken]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]]; [request setHTTPMethod:@”POST”]; […]

How to load a xib file in a UIView

I have been searching everywhere and nothing so far has worked for me. Basically I want to have a .xib file called rootView.xib and inside it I want to have a UIView (lets call it containerView) that takes up only half of the screen (so there would be the regular view and a new view). […]

How to know if two emojis will be displayed as one emoji?

The emoji 👍🏼 consists of 2 unicodeScalars 👍 U+1F44D, 🏼 U+1F3FC. How can this be identified as 1 ‘displayed’ emoji as it will be displayed as such on iOS?

Calling a phone number in swift

I’m trying to call a number not using specific numbers but a number that is being called in a variable or at least tell it to pull up the number in your phone. This number that is being called in a variable is a number that I retrieved by using a parser or grabbing from […]

Determining 3G vs Edge

I know that the reachability example allows detection of whether network is accessible via Wifi or Cell, but is there a way to determine whether the cell connection is over 3G or EDGE?

Choose custom sound for local notifications

How do you change the sound that plays for local notifications? I use the code below to play the default sound: notif.soundName = UILocalNotificationDefaultSoundName; So, I tried this below, and it didn’t work. What should I do? Thanks for your help! notif.soundName = @”sound.caf”;

how do you draw a line programmatically from a view controller?

I have a UIViewController. I want to draw a line in one of its programmatically created views. Seems simple enough, but I haven’t found sample code that works.