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

Detecting when the 'back' button is pressed on a navbar

I need to perform some actions when the back button(return to previous screen, return to parent-view) button is pressed on a Navbar. Is there some method I can implement to catch the event and fire off some actions to pause and save data before the screen disappears?

Identify new iPhone model on xcode (5, 5c, 5s)

This question already has an answer here: Determine device (iPhone, iPod Touch) with iPhone SDK 29 answers

iOS 7 — navigationController is setting the contentInset and ContentOffset of my UIScrollView

I have a UIScrollView (actually a UICollectionView, but that probably doesn’t matter). When it appears in IOS 7, the navigation controller sets its contentInset and contentOffset to values I don’t want. It appears to be trying to adjust for the status bar and the navigation bar. I’d greatly prefer it left them alone. I’ve fixed […]

How to change inside background color of UISearchBar component on iOS

I know how to remove/change UISearchBar background color around search field: [[self.searchBar.subviews objectAtIndex:0] removeFromSuperview]; self.searchBar.backgroundColor = [UIColor grayColor]; But don’t know how to do this inside it like that: This needs to be compatible with iOS 4.3+.

iOS 9 Facebook login simulator -canOpenURL: failed for URL: “fbauth2:///” – error: “(null)”

I’ve updated to Xcode 7 and the latest iOS SDK. I’ve added the appropriate entries in my app’s plist: My app’s Facebook login works fine on device. However, on iOS 9 simulator, I’m getting: -canOpenURL: failed for URL: “fbauth2:///” – error: “(null)” And login is not working. I’ve seen facebook login issue – canOpenURL: failed […]

boundingRectWithSize for NSAttributedString returning wrong size

I am trying to get the rect for an attributed string, but the boundingRectWithSize call is not respecting the size I pass in and is returning a rect with a single line height as opposed to a large height (it is a long string). I have experimented by passing in a very large value for […]

Does Apple provide an API for SIRI?

Is it possible that Apple does or will provide an API for Siri? It would be great if I can be sipping my coffee and say, User: Hey Siri, could you please open Angry Birds; Level 4 and throw a first bird for me. Make sure you at least hit one green pig or it’s […]

Simple http post example in Objective-C?

I have a php webpage that requires a login (userid & password). I have the user enter the information into the app just fine.. but I need an example on how to do a POST request to a website. The apple example on the support site is rather complicated showing a picture upload.. mine should […]

iOS: Keep an app running like a service

In iOS, how would I instruct the OS to keep my app running even if it is no longer in the foreground? Skype Viber Empatica Zenly And many more apps does this.

Is this possible to apply the alternative icon to the iOS application?

I need to change the app icon based on region, is this possible?