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

iPad Safari – Make keyboard disappear

In iPad Safari browser, when I change focus from a textbox to a dropdown, the keyboard still remains… Is there some way (maybe with Javascript) I can hide the keyboard when user blurs from the textbox? Indirectly speaking, I am looking for a equivalent of (but in Mobile Safari) [tempTextField resignFirstResponder];

How to compare UIColors?

I’d like to check the color set for a background on a UIImageView. I’ve tried: if(myimage.backgroundColor == [UIColor greenColor]){ …} else{ …} but that doesn’t work, even when I know the color is green, it always falls into the else part. Also, is there a way to output the current color in the debug console. […]

How do you create a swift Date object

How do you create a date object from a date in swift xcode. eg in javascript you would do: var day = new Date(‘2014-05-20’);

Where's the difference between setObject:forKey: and setValue:forKey: in NSMutableDictionary?

When looking at the documentation, I hardly see any big difference. Both “value” and “object” are of type id, so can be any object. Key is once a string, and in the other case an id. One of them seems to retain the object, and the other don’t. What else? Which one is for what […]

Super slow lag/delay on initial keyboard animation of UITextField

Alright, this problem has been driving me nuts. It takes roughly 3-4 seconds for the keyboard to pop up after I touch my UITextField. This only occurs on the first time the keyboard pops up since the app launched, afterwards the animation starts instantly. At first I thought it was problem of loading too many […]

How can i change the color of pagination dots of UIPageControl?

I am developing an application in which I want to change either color or image of UIPageControl pagination dots. How can I change it? Is it possible to customize UIpageControl on above scenario?

iOS crash log catch, debug info.. Catch and send via email to the Dev team

Recently we came across a situation where we wanted to see the debug info from the app which a user has on his device. So, what I am looking for is a way to find the log on the device, paste it as inline text on a mail and allow the user to send it.. […]

Making GCM work for iOS device in the background

I’m trying to use GCM for IOS and Android clients. It seems to work fine with IOS when app is in the foreground, however, when the app is in the background, the notification center doesn’t receive the message and didReceiveRemoteNotification with completionHandler doesn’t get called. I identified a problem as a wrongly formatted message from […]

Clearing UIWebview cache

I have used UIWebview to load a web page using loadRequest: method, when I leave that scene I call [self.webView stopLoading]; and release the webView. In activity monitor on first launch i have seen that the real memory increased by 4MB, and on multiple launches/loading the real memory doesn’t increase. It is increasing only once. […]

How do I check when a UITextField changes?

I am trying to check when a text field changes, equivalent too the function used for textView – textViewDidChange so far I have done this: func textFieldDidBeginEditing(textField: UITextField) { if self.status.text == “” && self.username.text == “” { self.topRightButton.enabled = false } else { self.topRightButton.enabled = true } } Which kind of works, but the […]