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

Using UpdateChildValues to delete from Firebase

I am trying to delete data from several locations in the Firebase database simultaneously. The Firebase docs state: “The simplest way to delete data is to call removeValue on a reference to the location of that data. You can also delete by specifying nil as the value for another write operation such as setValue or […]

Using disk cached images if present in Alamofire Images

I’m using the AlamofireImage library to cache downloaded images. Code: import UIKit import AlamofireImage class ViewController: UIViewController { @IBOutlet weak var firstImageView: UIImageView! @IBOutlet weak var secondImageView: UIImageView! let downloader = ImageDownloader() let URLRequest = NSURLRequest(URL: NSURL(string: “”)!) override func viewDidLoad() { super.viewDidLoad() requestFirstImage() } func requestFirstImage() { downloader.downloadImage(URLRequest: URLRequest) { response in print(response.request) print(response.response) […]

CLLocation returning negative speed

I’m starting a new app which uses the coreLocation and the mapkit frameworks. My problem is trying to get the current speed always returns me a negative value, i have take my iPhone with me to places with a good 3g signal and it doesn’t matter, location.speed value is always -1. here is the code […]

does my app display second time notification iOS 9

I am receiving the duplicate Notification. for both Remote notification and Local notifications. I have used the following code [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0){ [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [[UIApplication sharedApplication] registerForRemoteNotifications]; } else{ [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)]; } -(void)application:(UIApplication *)application […]

NSURLCache does not clear stored responses in iOS8

Here is the sample function i call when i need to clear cache and make a new call to URL – (void)clearDataFromNSURLCache:(NSString *)urlString { NSURL *requestUrl = [NSURL URLWithString:urlString]; NSURLRequest *dataUrlRequest = [NSURLRequest requestWithURL: requestUrl]; NSURLCache * cache =[NSURLCache sharedURLCache]; NSCachedURLResponse* cacheResponse =[cache cachedResponseForRequest:dataUrlRequest]; if (cacheResponse) { NSString* dataStr = [NSString stringWithUTF8String:[[cacheResponse data] bytes]]; NSLog(@”data […]

Weird iOS bug with UITableViewCell and userInteractionEnabled

I just noticed something very strange with the UITableViewCell class on iOS and the userInteractionEnabled property. It appears that if userInteractionEnabled is set to NO before assigning text to the cell label, then the text is coloured grey. However, setting userInteractionEnabled to NO after the text has been set leaves the text colour as black […]

Has anyone created a MonoTouch binding for the Nuance Dragon Mobile Speech SDK for iOS?

I have the Dragon Mobile SDK running nicely on Windows Phone 7 and I would like to get the equivalent functionality working for iOS. Since the SDK wraps the microphone, it’s not really possible to use the .NET assemblies in my MonoTouch project (even if I did have the source). It appears that the best […]

Loading NSData into a UIWebView

In my web browser, I am trying to load a UIWebView with NSData obtained from a NSURLConnection. When I try to load it into the UIWebView, instead of the site, it comes up with the HTML plain text. Here is my code: in viewDidLoad: NSURLRequest *request = [NSURLRequest requestWithURL: [NSURL URLWithString:@””]]; [NSURLConnection connectionWithRequest: request delegate:self]; […]

iOS Search Results Order

I have a UISearchBar that searches a table of data. When a search is typed in, the results are displayed in an order like so: Starts typing ‘ch…’ 1. Ache 2. Cherries 3. Choice It makes more sense to me (and for my app) that ‘Cherries’ and ‘Choice’ would be at the top of the […]

How to Check if Parallax is enabled

I am making a wallpaper app and would like to check if a user has parallax enabled on his iOS 7 device. Is there a way in objective-C that I can check that? Has Apple granted us developers access to check this boolean? i.e. if parallax is enabled do step1 otherwise do step2