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

How can I change image tintColor in iOS and WatchKit

I have an UIImageView called “theImageView”, with UIImage in a single color (transparent background) just like the left black heart below. How can I change the tint color of this image programmatically in iOS 7 or above, as per the tint method used in the iOS 7+ Navigation Bar icons? Can this method also work […]

What's the best way to develop a sideswipe menu like the one in Facebook's new iOS app?

It appears that side-swipe menus are becoming a more common interface element as more information gets crammed into each iPhone app. Facebook has included it in their latest version and the new Gmail app appears to include it as well. I was wondering if anybody had thoughts on the most efficient way of developing something […]

Get button click inside UI table view cell

I have a ViewController with tableview and a separate nib for the table cell template. The Cell template has some buttons. I want to access the button click along with the index of the cell clicked inside the View controller where I have defined the Table view. So I have ViewController.h and ViewController.m where I […]

Crash when presenting a ViewController from modally presented ViewController

In our production app we do have crash reports on presenting a ViewController from a modally presented `ViewController. We have a BackgroundForegroundDelegate. Whenever the app enters the background it’ll present a Lockscreen on top of the current ViewController. AppDelegate: func applicationDidEnterBackground(_ application: UIApplication) { backgroundForegroundDelegate?.applicationDidEnterBackground() } func applicationWillEnterForeground(_ application: UIApplication) { backgroundForegroundDelegate?.applicationWillEnterForeground() } LockScreenViewController: class […]

UIView with rounded corners and drop shadow?

I’ve literally tried everything I could but none of them work for a custom UIView… I just wanted a blank white view with rounded corners and a light drop shadow (with no lighting effect). I can do each of those one by one but the usual clipToBounds/maskToBounds conflicts occur.

What is “Constrain to margin” in Storyboard in Xcode 6

I am Working with autolayout and constraints and found there is a Constrain to margins option in XCode 6 which was not present in XCode 5 and is checked by default. I created a test project then I added a UITableView on a ViewController with the frame set to the same size as view and […]

Converting NSString to NSDate (and back again)

How would I convert an NSString like “01/02/10” (meaning 1st February 2010) into an NSDate? And how could I turn the NSDate back into a string?

Parsing multiple arrays from a JSON object in Swift

I am building an iOS app using Swift3 and for part of the app, I send an HTTP POST request to a webpage which returns a JSON object containing 5 different arrays. I wish to receive this JSON object in Swift and have these arrays in a readable format (NSArray). Below is exactly what my […]

File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?

I upgraded Xcode version and when using external static libraries, I get this message: ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation) Is there any way to bypass this and add support […]

How do I URL encode a string

I have a URL string (NSString) with spaces and & characters. How do I url encode the entire string (including the & ampersand character and spaces)?