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

Customizing the iOS permission dialog for push notifications

When an iOS app attempts to register for push notifications for the first time, the system pops up a permissions dialog asking the user for permission to receive push notifications. Is it possible to customize the text of this dialog, to explain why these permissions are being sought?

Detecting Tap & Hold in UITableView cells

How do we detect a tap & hold on a UITableViewCell?

Selecting a word in a UITextView

EDIT: I’m thinking I should use a UILabel instead of a UITextView as I don’t want the highlight to use the system wide blue with ‘copy/select all/define’ popover. I’m trying to build a custom text view, and I’m looking for some help with the right approach. I’m an iOS n00b so mainly looking for ideas […]

Always stop in App delegate after enabling All exceptions break point

When i enable all exceptions breakpoint my app always stops in AppDelegate, but im able to continue the program execution, but its very annoying cause always takes me to the appdelegate. Any ideas why?

Set gradient behind UITableView

I have created a tableViewController where I’m calling this function: func setTableViewBackgroundGradient(sender: UITableViewController ,let topColor:UIColor, let bottomColor:UIColor){ let gradientBackgroundColors = [topColor.CGColor, bottomColor.CGColor] let gradientLocations = [0.0,1.0] let gradientLayer = CAGradientLayer() gradientLayer.colors = gradientBackgroundColors gradientLayer.locations = gradientLocations gradientLayer.frame = sender.tableView.bounds sender.tableView.backgroundView?.layer.insertSublayer(gradientLayer, atIndex: 0) } with: setTableViewBackgroundGradient(self, UIColor(0xF47434), UIColor(0xEE3965)) but all i get is this:

Parse JSON response with AFNetworking

I’ve setup a JSON post with AFNetworking in Objective-C and am sending data to a server with the following code: AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSDictionary *parameters = @{@”name”: deviceName, @”model”: modelName, @”pin”: pin}; manager.requestSerializer = [AFJSONRequestSerializer serializer]; [manager.requestSerializer setValue:@”Content-Type” forHTTPHeaderField:@”application/json”]; [manager POST:@”SENSORED_OUT_URL” parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@”JSON: %@”, responseObject); } failure:^(AFHTTPRequestOperation *operation, […]

How long do iAd apps take to start generating impressions?

I released an app with an iAd in it on Friday. So far it has generated zero impressions with many requests – a fill rate of zero. Most of my requests are in the USA (~90%) so the problem is not that the requests are from countries which iAd does not support). An older app […]

AWS Cognito User Pools in iOS (Swift) app

I’m trying to implement the new AWS Cognito User Pools in my iOS (Swift) app, but I’m struggling to get the sign in process to work. I am essentially trying to follow the example available here. This is what I have so far: AppDelegate: class AppDelegate: UIResponder, UIApplicationDelegate, AWSCognitoIdentityInteractiveAuthenticationDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: […]

What is Generic iOS Device in Xcode 7.1 run destinations list?

I found a strange option in my simulators list in Xcode I’ve never seen before. Generic iOS Device in Build Only Device Interesting, but when I try to build for this device – I get error: A build only device cannot be used to run this target. Please select an available device or choose a […]

Language Translation API for iPhone

I want to implement language translation feature in my iPhone app, is there any API which is free that I can use, or any other way to do this.